@@ -33,7 +33,7 @@ |
||
| 33 | 33 | public function _on_loaded() |
| 34 | 34 | { |
| 35 | 35 | // if we are missing the component, use the nullcomponent. |
| 36 | - if ( !$this->component |
|
| 36 | + if (!$this->component |
|
| 37 | 37 | || !midcom::get()->componentloader->is_installed($this->component)) { |
| 38 | 38 | debug_add("Topic {$this->id} has no component assigned to it, using 'midcom.core.nullcomponent'.", |
| 39 | 39 | MIDCOM_LOG_INFO); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $this->acl = $acl; |
| 125 | 125 | |
| 126 | 126 | // Initialize from midgard |
| 127 | - if ( midcom_connection::get_user() |
|
| 127 | + if (midcom_connection::get_user() |
|
| 128 | 128 | && $user = $this->get_user(midcom_connection::get_user())) { |
| 129 | 129 | $this->set_user($user); |
| 130 | 130 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | $person_class = midcom::get()->config->get('person_class'); |
| 151 | 151 | $person = new $person_class($this->user->guid); |
| 152 | - if ( midcom::get()->config->get('auth_save_prev_login') |
|
| 152 | + if (midcom::get()->config->get('auth_save_prev_login') |
|
| 153 | 153 | && $person->get_parameter('midcom', 'last_login')) { |
| 154 | 154 | $person->set_parameter('midcom', 'prev_login', $person->get_parameter('midcom', 'last_login')); |
| 155 | 155 | } |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | return true; |
| 267 | 267 | } |
| 268 | 268 | if ($user === null) { |
| 269 | - $user =& $this->user; |
|
| 269 | + $user = & $this->user; |
|
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | if ($user == 'EVERYONE') { |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | public function require_admin_or_ip($domain) : bool |
| 474 | 474 | { |
| 475 | 475 | $ips = midcom::get()->config->get('indexer_reindex_allowed_ips'); |
| 476 | - if ( $ips |
|
| 476 | + if ($ips |
|
| 477 | 477 | && in_array($_SERVER['REMOTE_ADDR'], $ips)) { |
| 478 | 478 | if (!$this->request_sudo($domain)) { |
| 479 | 479 | throw new midcom_error('Failed to acquire SUDO rights. Aborting.'); |