Commit dddd0542 authored by Tino Goratsch's avatar Tino Goratsch

remove useless condition

parent 75e30c56
...@@ -365,21 +365,19 @@ class Index extends Core\Modules\AdminController ...@@ -365,21 +365,19 @@ class Index extends Core\Modules\AdminController
protected function fetchNewsOptions(array $settings, $readmoreValue, $commentsValue) protected function fetchNewsOptions(array $settings, $readmoreValue, $commentsValue)
{ {
$options = []; $options = [];
if ($settings['readmore'] == 1 || ($settings['comments'] == 1 && $this->modules->isActive('comments') === true)) { if ($settings['readmore'] == 1) {
if ($settings['readmore'] == 1) { $options[] = [
$options[] = [ 'name' => 'readmore',
'name' => 'readmore', 'checked' => $this->get('core.helpers.forms')->selectEntry('readmore', '1', $readmoreValue, 'checked'),
'checked' => $this->get('core.helpers.forms')->selectEntry('readmore', '1', $readmoreValue, 'checked'), 'lang' => $this->lang->t('news', 'activate_readmore')
'lang' => $this->lang->t('news', 'activate_readmore') ];
]; }
} if ($settings['comments'] == 1 && $this->modules->isActive('comments') === true) {
if ($settings['comments'] == 1 && $this->modules->isActive('comments') === true) { $options[] = [
$options[] = [ 'name' => 'comments',
'name' => 'comments', 'checked' => $this->get('core.helpers.forms')->selectEntry('comments', '1', $commentsValue, 'checked'),
'checked' => $this->get('core.helpers.forms')->selectEntry('comments', '1', $commentsValue, 'checked'), 'lang' => $this->lang->t('system', 'allow_comments')
'lang' => $this->lang->t('system', 'allow_comments') ];
];
}
} }
return $options; return $options;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment