@@ -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 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | ]; |
143 | 143 | } |
144 | 144 | |
145 | - if ( midcom::get()->config->get('midcom_services_rcs_enable') |
|
145 | + if (midcom::get()->config->get('midcom_services_rcs_enable') |
|
146 | 146 | && $object->can_do('midgard:update') |
147 | 147 | && $object->_use_rcs) { |
148 | 148 | $buttons[] = [ |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | private function get_toolbar_update_items($object) : array |
204 | 204 | { |
205 | 205 | $buttons = []; |
206 | - if ( $object instanceof midcom_db_topic |
|
206 | + if ($object instanceof midcom_db_topic |
|
207 | 207 | && $object->component |
208 | 208 | && $object->can_do('midcom:component_config')) { |
209 | 209 | $buttons[] = [ |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | MIDCOM_TOOLBAR_ENABLED => $object->can_do('midgard:privileges'), |
242 | 242 | ]; |
243 | 243 | |
244 | - if ( midcom::get()->componentloader->is_installed('midcom.helper.replicator') |
|
244 | + if (midcom::get()->componentloader->is_installed('midcom.helper.replicator') |
|
245 | 245 | && midcom::get()->auth->admin) { |
246 | 246 | $buttons[] = [ |
247 | 247 | 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 | } |
@@ -126,7 +126,8 @@ |
||
126 | 126 | $salesproject = org_openpsa_sales_salesproject_dba::get_cached($this->_deliverable->salesproject); |
127 | 127 | try { |
128 | 128 | $owner = midcom_db_person::get_cached($salesproject->owner); |
129 | - } catch (midcom_error $e) { |
|
129 | + } |
|
130 | + catch (midcom_error $e) { |
|
130 | 131 | $e->log(); |
131 | 132 | return; |
132 | 133 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | // TODO: Warehouse management: create new order |
98 | - if ( $this->_deliverable->end < $next_cycle_start |
|
98 | + if ($this->_deliverable->end < $next_cycle_start |
|
99 | 99 | && $this->_deliverable->end != 0) { |
100 | 100 | debug_add('Do not register next cycle, the contract ends before'); |
101 | 101 | return $this->_deliverable->end_subscription(); |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | |
325 | 325 | //If previous cycle was run at the end of the month, the new one should be at the end of the month as well |
326 | 326 | $date = new DateTime(gmdate('Y-m-d', $time), new DateTimeZone('GMT')); |
327 | - if ( $date->format('t') == $date->format('j') |
|
327 | + if ($date->format('t') == $date->format('j') |
|
328 | 328 | && $new_date->format('t') != $new_date->format('j')) { |
329 | 329 | $new_date->setDate((int) $new_date->format('Y'), (int) $new_date->format('m'), (int) $new_date->format('t')); |
330 | 330 | } |
@@ -51,7 +51,8 @@ |
||
51 | 51 | } |
52 | 52 | try { |
53 | 53 | $this->_request_data['product'] = org_openpsa_products_product_dba::get_cached($this->_deliverable->product); |
54 | - } catch (midcom_error $e) { |
|
54 | + } |
|
55 | + catch (midcom_error $e) { |
|
55 | 56 | $this->_request_data['product'] = false; |
56 | 57 | } |
57 | 58 | } |