@@ -109,7 +109,7 @@ |
||
109 | 109 | */ |
110 | 110 | public function members_to_fields() |
111 | 111 | { |
112 | - if ( empty($this->topic_guid) |
|
112 | + if (empty($this->topic_guid) |
|
113 | 113 | || empty($this->topic_url) |
114 | 114 | || empty($this->component)) { |
115 | 115 | //if one of those is missing, we override all three to ensure consistency |
@@ -104,7 +104,7 @@ |
||
104 | 104 | $this->add('Setting: upload_max_filesize', self::OK, ini_get('upload_max_filesize')); |
105 | 105 | } else { |
106 | 106 | $this->add('Setting: upload_max_filesize', |
107 | - self::WARNING, "To make bulk uploads (for exampe in the Image Gallery) useful, you should increase the Upload limit to something above 50 MB. (Current setting: {$upload_limit})"); |
|
107 | + self::WARNING, "To make bulk uploads (for exampe in the Image Gallery) useful, you should increase the Upload limit to something above 50 MB. (Current setting: {$upload_limit})"); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | $post_limit = $this->ini_get_filesize('post_max_size'); |
@@ -81,7 +81,8 @@ |
||
81 | 81 | $class = $config->get_backend_class(); |
82 | 82 | new $class(new midcom_db_topic, $config); |
83 | 83 | $this->add("MidCOM RCS", self::OK, $class); |
84 | - } catch (midcom_error $e) { |
|
84 | + } |
|
85 | + catch (midcom_error $e) { |
|
85 | 86 | $this->add("MidCOM RCS", self::ERROR, $e->getMessage()); |
86 | 87 | } |
87 | 88 | } else { |
@@ -117,7 +117,8 @@ |
||
117 | 117 | } |
118 | 118 | break; |
119 | 119 | } |
120 | - } catch (midcom_error $e) { |
|
120 | + } |
|
121 | + catch (midcom_error $e) { |
|
121 | 122 | $e->log(); |
122 | 123 | } |
123 | 124 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | ]; |
148 | 148 | } |
149 | 149 | |
150 | - if ( midcom::get()->config->get('midcom_services_rcs_enable') |
|
150 | + if (midcom::get()->config->get('midcom_services_rcs_enable') |
|
151 | 151 | && $object->can_do('midgard:update') |
152 | 152 | && $object->_use_rcs) { |
153 | 153 | $buttons[] = [ |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | private function get_toolbar_update_items($object) : array |
209 | 209 | { |
210 | 210 | $buttons = []; |
211 | - if ( is_a($object, midcom_db_topic::class) |
|
211 | + if (is_a($object, midcom_db_topic::class) |
|
212 | 212 | && $object->component |
213 | 213 | && $object->can_do('midcom:component_config')) { |
214 | 214 | $buttons[] = [ |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | MIDCOM_TOOLBAR_ENABLED => $object->can_do('midgard:privileges'), |
247 | 247 | ]; |
248 | 248 | |
249 | - if ( midcom::get()->componentloader->is_installed('midcom.helper.replicator') |
|
249 | + if (midcom::get()->componentloader->is_installed('midcom.helper.replicator') |
|
250 | 250 | && midcom::get()->auth->admin) { |
251 | 251 | $buttons[] = [ |
252 | 252 | MIDCOM_TOOLBAR_URL => "__mfa/asgard_midcom.helper.replicator/object/{$object->guid}/", |
@@ -217,7 +217,8 @@ |
||
217 | 217 | |
218 | 218 | try { |
219 | 219 | $account = new midcom_core_account($person); |
220 | - } catch (midcom_error $e) { |
|
220 | + } |
|
221 | + catch (midcom_error $e) { |
|
221 | 222 | midcom::get()->uimessages->add($this->_l10n->get('midgard.admin.user'), sprintf($this->_l10n->get('failed to get the user with id %s'), $person->id), 'error'); |
222 | 223 | return; |
223 | 224 | } |
@@ -92,7 +92,8 @@ |
||
92 | 92 | $customer = new org_openpsa_contacts_group_dba($customer_id); |
93 | 93 | $customer_label = $customer->official; |
94 | 94 | $customer = $customer_id; |
95 | - } catch (midcom_error $e) { |
|
95 | + } |
|
96 | + catch (midcom_error $e) { |
|
96 | 97 | } |
97 | 98 | } |
98 | 99 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $ownerwg = $this->get_parameter('org.openpsa.core', 'orgOpenpsaOwnerWg'); |
21 | 21 | $accesstype = $this->get_parameter('org.openpsa.core', 'orgOpenpsaAccesstype'); |
22 | 22 | |
23 | - if ( $ownerwg |
|
23 | + if ($ownerwg |
|
24 | 24 | && $accesstype) { |
25 | 25 | // Sync the object's ACL properties into MidCOM ACL system |
26 | 26 | $sync = new org_openpsa_core_acl_synchronizer(); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | private function _update_parent_timestamp() |
42 | 42 | { |
43 | 43 | $parent = $this->get_parent(); |
44 | - if ( $parent |
|
44 | + if ($parent |
|
45 | 45 | && $parent->component == 'org.openpsa.documents') { |
46 | 46 | midcom::get()->auth->request_sudo('org.openpsa.documents'); |
47 | 47 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | } else { |
19 | 19 | $client = new org_openpsa_httplib(); |
20 | - if ( !empty($_REQUEST['username']) |
|
20 | + if (!empty($_REQUEST['username']) |
|
21 | 21 | && !empty($_REQUEST['password'])) { |
22 | 22 | $client->basicauth['user'] = $_REQUEST['username']; |
23 | 23 | $client->basicauth['password'] = $_REQUEST['password']; |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | midcom::get()->auth->require_admin_user(); |
3 | 3 | |
4 | -if ( empty($_POST['to']) |
|
4 | +if (empty($_POST['to']) |
|
5 | 5 | || empty($_POST['from'])) { |
6 | 6 | ?> |
7 | 7 | <h2>Send test email</h2> |
@@ -52,7 +52,8 @@ |
||
52 | 52 | // TODO: Should we sudo here to ensure getting correct prefs regardless of ACLs? |
53 | 53 | try { |
54 | 54 | $recipient = midcom_db_person::get_cached($recipient); |
55 | - } catch (midcom_error $e) { |
|
55 | + } |
|
56 | + catch (midcom_error $e) { |
|
56 | 57 | return false; |
57 | 58 | } |
58 | 59 |
@@ -102,7 +102,7 @@ |
||
102 | 102 | |
103 | 103 | // If user has preference for this message, we use that |
104 | 104 | $personal_preferences = $recipient->list_parameters('org.openpsa.notifications'); |
105 | - if ( !empty($personal_preferences) |
|
105 | + if (!empty($personal_preferences) |
|
106 | 106 | && array_key_exists("{$component}:{$action}", $personal_preferences)) { |
107 | 107 | return $personal_preferences[$action]; |
108 | 108 | } |