@@ -105,8 +105,8 @@ discard block |
||
| 105 | 105 | $year_data = []; |
| 106 | 106 | $first_post = $this->_compute_welcome_first_post(); |
| 107 | 107 | $this->_request_data['first_post'] = $first_post; |
| 108 | - $this->_request_data['total_count'] =& $total_count; |
|
| 109 | - $this->_request_data['year_data'] =& $year_data; |
|
| 108 | + $this->_request_data['total_count'] = & $total_count; |
|
| 109 | + $this->_request_data['year_data'] = & $year_data; |
|
| 110 | 110 | if (!$first_post) { |
| 111 | 111 | return; |
| 112 | 112 | } |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | if ($category) { |
| 243 | 243 | $category = trim(strip_tags($category)); |
| 244 | - if ( $data['datamanager']->get_schema('default')->has_field('categories') |
|
| 244 | + if ($data['datamanager']->get_schema('default')->has_field('categories') |
|
| 245 | 245 | && !$data['datamanager']->get_schema('default')->get_field('categories')['type_config']['allow_multiple']) { |
| 246 | 246 | $qb->add_constraint('extra1', '=', $category); |
| 247 | 247 | } else { |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | throw new midcom_error_notfound("The year '{$year}' is not valid."); |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | - if ( $month < 1 |
|
| 317 | + if ($month < 1 |
|
| 318 | 318 | || $month > 12) { |
| 319 | 319 | throw new midcom_error_notfound("The month {$month} is not valid."); |
| 320 | 320 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | |
| 49 | 49 | if ($category) { |
| 50 | 50 | // This is not a predefined category from configuration, check if site maintainer allows us to show it |
| 51 | - if ( !in_array($category, $data['categories']) |
|
| 51 | + if (!in_array($category, $data['categories']) |
|
| 52 | 52 | && !$this->_config->get('categories_custom_enable')) { |
| 53 | 53 | throw new midcom_error('Custom category support is disabled'); |
| 54 | 54 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $this->_topic->require_do('midgard:create'); |
| 30 | 30 | |
| 31 | 31 | $schemadb = $data['schemadb']; |
| 32 | - if ( $this->_config->get('simple_name_handling') |
|
| 32 | + if ($this->_config->get('simple_name_handling') |
|
| 33 | 33 | && !midcom::get()->auth->can_user_do('midcom:urlname')) { |
| 34 | 34 | foreach ($schemadb->all() as $schema) { |
| 35 | 35 | $schema->get_field('name')['readonly'] = true; |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | $item->title = $data['article']->title; |
| 19 | 19 | |
| 20 | -if ( $data['config']->get('link_to_external_url') |
|
| 20 | +if ($data['config']->get('link_to_external_url') |
|
| 21 | 21 | && !empty($data['article']->url)) { |
| 22 | 22 | $item->link = $data['article']->url; |
| 23 | 23 | } else { |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $item->description .= '<div class="abstract">' . $view['abstract'] . '</div>'; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | -if ( array_key_exists('image', $view) |
|
| 36 | +if (array_key_exists('image', $view) |
|
| 37 | 37 | && $data['config']->get('rss_use_image')) { |
| 38 | 38 | $item->description .= "\n<div class=\"image\">" . $view['image'] . '</div>'; |
| 39 | 39 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | |
| 32 | 32 | // Catch first the configuration option for showing editing interface instead |
| 33 | 33 | // of redirecting administrators |
| 34 | - if ( $this->_topic->can_do('net.nemein.redirector:noredirect') |
|
| 34 | + if ($this->_topic->can_do('net.nemein.redirector:noredirect') |
|
| 35 | 35 | && !$this->_config->get('admin_redirection')) { |
| 36 | 36 | return new midcom_response_relocate("edit/{$args[0]}/"); |
| 37 | 37 | } |