@@ -611,7 +611,8 @@ discard block |
||
| 611 | 611 | $param = $param->__object; |
| 612 | 612 | } |
| 613 | 613 | $this->_user_cache[$id] = new midcom_core_user($param); |
| 614 | - } catch (midcom_error $e) { |
|
| 614 | + } |
|
| 615 | + catch (midcom_error $e) { |
|
| 615 | 616 | // Keep it silent while missing user object can mess here |
| 616 | 617 | $this->_user_cache[$id] = null; |
| 617 | 618 | } |
@@ -645,7 +646,8 @@ discard block |
||
| 645 | 646 | $param = $param->__object; |
| 646 | 647 | } |
| 647 | 648 | $this->_group_cache[$id] = new midcom_core_group($param); |
| 648 | - } catch (midcom_error $e) { |
|
| 649 | + } |
|
| 650 | + catch (midcom_error $e) { |
|
| 649 | 651 | debug_add("Group with identifier {$id} could not be loaded: " . $e->getMessage(), MIDCOM_LOG_WARN); |
| 650 | 652 | $this->_group_cache[$id] = null; |
| 651 | 653 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | return false; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - if ( midcom::get()->config->get('auth_check_client_ip') |
|
| 88 | + if (midcom::get()->config->get('auth_check_client_ip') |
|
| 89 | 89 | && $data['clientip'] != $request->getClientIp()) { |
| 90 | 90 | debug_add("The session had mismatching client IP.", MIDCOM_LOG_INFO); |
| 91 | 91 | debug_add("Expected {$data['clientip']}, got {$request->getClientIp()}."); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | return false; |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - if ( !$this->check_timestamp($data['timestamp'], $user) |
|
| 102 | + if (!$this->check_timestamp($data['timestamp'], $user) |
|
| 103 | 103 | || !$this->authenticate($user->username, '', true)) { |
| 104 | 104 | $this->logout($user); |
| 105 | 105 | return false; |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | $user = midcom_connection::login($username, $password, $trusted); |
| 146 | 146 | |
| 147 | 147 | if (!$user) { |
| 148 | - debug_add("Failed to authenticate the given user: ". midcom_connection::get_error_string(), |
|
| 148 | + debug_add("Failed to authenticate the given user: " . midcom_connection::get_error_string(), |
|
| 149 | 149 | MIDCOM_LOG_INFO); |
| 150 | 150 | return null; |
| 151 | 151 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $tmp = $this->_object; |
| 93 | 93 | |
| 94 | 94 | $i = 0; |
| 95 | - while ( !empty($tmp->guid) |
|
| 95 | + while (!empty($tmp->guid) |
|
| 96 | 96 | && !is_a($tmp, midcom_db_topic::class) |
| 97 | 97 | && $i < 100) { |
| 98 | 98 | // Get the parent; wishing eventually to get a topic |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | $assignees = $this->load_assignees(); |
| 139 | 139 | $this->process_assignees($assignees, $schemadb); |
| 140 | - $assignee_field =& $schemadb->get('privileges')->get_field('add_assignee'); |
|
| 140 | + $assignee_field = & $schemadb->get('privileges')->get_field('add_assignee'); |
|
| 141 | 141 | |
| 142 | 142 | if (!$this->additional_assignee) { |
| 143 | 143 | // Populate additional assignee selector |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | if ($assignee = midcom::get()->auth->get_assignee($privilege->assignee)) { |
| 237 | 237 | $label = $assignee->name; |
| 238 | 238 | } else { |
| 239 | - $label = $this->_l10n->get('ghost assignee for '. $privilege->assignee); |
|
| 239 | + $label = $this->_l10n->get('ghost assignee for ' . $privilege->assignee); |
|
| 240 | 240 | } |
| 241 | 241 | } |
| 242 | 242 | |