@@ -64,14 +64,14 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | private function _add_pseudo_leaves(array &$leaves) |
| 66 | 66 | { |
| 67 | - if ( $this->_config->get('archive_enable') |
|
| 67 | + if ($this->_config->get('archive_enable') |
|
| 68 | 68 | && $this->_config->get('archive_in_navigation')) { |
| 69 | 69 | $leaves["{$this->_topic->id}_ARCHIVE"] = [ |
| 70 | 70 | MIDCOM_NAV_URL => "archive/", |
| 71 | 71 | MIDCOM_NAV_NAME => $this->_l10n->get('archive'), |
| 72 | 72 | ]; |
| 73 | 73 | } |
| 74 | - if ( $this->_config->get('rss_enable') |
|
| 74 | + if ($this->_config->get('rss_enable') |
|
| 75 | 75 | && $this->_config->get('feeds_in_navigation')) { |
| 76 | 76 | $leaves[self::LEAFID_FEEDS] = [ |
| 77 | 77 | MIDCOM_NAV_URL => "feeds/", |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | ]; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - if ( $this->_config->get('categories_in_navigation') |
|
| 82 | + if ($this->_config->get('categories_in_navigation') |
|
| 83 | 83 | && $this->_config->get('categories') != '') { |
| 84 | 84 | $categories = explode(',', $this->_config->get('categories')); |
| 85 | 85 | foreach ($categories as $category) { |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - if ( $this->_config->get('archive_years_in_navigation') |
|
| 93 | + if ($this->_config->get('archive_years_in_navigation') |
|
| 94 | 94 | && $this->_config->get('archive_years_enable')) { |
| 95 | 95 | $qb = midcom_db_article::new_query_builder(); |
| 96 | 96 | $qb->add_constraint('topic', '=', $this->_topic->id); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | public static function add_scheduling_constraints($qb, midcom_helper_configuration $config) |
| 125 | 125 | { |
| 126 | - if ( $config->get('enable_scheduled_publishing') |
|
| 126 | + if ($config->get('enable_scheduled_publishing') |
|
| 127 | 127 | && !midcom::get()->auth->admin) { |
| 128 | 128 | // Show the article only if the publishing time has passed or the viewer |
| 129 | 129 | // is the author |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | public function get_url(midcom_db_article $article, bool $allow_external = false) : string |
| 17 | 17 | { |
| 18 | - if ( $allow_external |
|
| 18 | + if ($allow_external |
|
| 19 | 19 | && $this->_config->get('link_to_external_url') |
| 20 | 20 | && !empty($article->url)) { |
| 21 | 21 | return $article->url; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | $qb->add_constraint('topic.guid', 'IN', $topic_guids); |
| 69 | 69 | |
| 70 | - if ( count($topic_guids) > 1 |
|
| 70 | + if (count($topic_guids) > 1 |
|
| 71 | 71 | && $list_from_folders_categories = $this->_config->get('list_from_folders_categories')) { |
| 72 | 72 | $list_from_folders_categories = explode(',', $list_from_folders_categories); |
| 73 | 73 | |