Browse Source

Update Item.php

pull/200/head
ullbergm 7 years ago
committed by GitHub
parent
commit
a93fb49875
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      app/Item.php

13
app/Item.php

@ -165,18 +165,11 @@ class Item extends Model
public function getLinkTargetAttribute()
{
if((int)$this->type === 1) {
$target = Setting::fetch('window_target');
if((int)$this->type === 1 || $target === 'current') {
return '';
} else {
$settings = Setting::all();
foreach($settings as $key => $val) {
if($val['key'] === 'window_target') {
$target = $val['value'];
if($target === 'current') {
$target = '';
}
}
}
return ' target="' . $target . '"';
}
}

Loading…
Cancel
Save