@@ -300,7 +300,8 @@ |
||
300 | 300 | $organization = $this->_import_subscribers_organization($subscriber); |
301 | 301 | $this->_import_subscribers_organization_member($subscriber, $person, $organization); |
302 | 302 | } |
303 | - } catch (midcom_error $e) { |
|
303 | + } |
|
304 | + catch (midcom_error $e) { |
|
304 | 305 | $e->log(); |
305 | 306 | // Clean up possibly created data |
306 | 307 | $this->_clean_new_objects(); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | // User is or has been subscriber earlier, update status |
134 | 134 | $member = $members[0]; |
135 | 135 | |
136 | - if ( $member->orgOpenpsaObtype == org_openpsa_directmarketing_campaign_member_dba::UNSUBSCRIBED |
|
136 | + if ($member->orgOpenpsaObtype == org_openpsa_directmarketing_campaign_member_dba::UNSUBSCRIBED |
|
137 | 137 | || $member->orgOpenpsaObtype == org_openpsa_directmarketing_campaign_member_dba::NORMAL) { |
138 | 138 | $this->_import_status['already_subscribed']++; |
139 | 139 | return; |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | $qb = org_openpsa_contacts_group_dba::new_query_builder(); |
175 | 175 | $schema = $this->_schemadbs['organization']->get('default'); |
176 | - if ( $schema->has_field('company_id') |
|
176 | + if ($schema->has_field('company_id') |
|
177 | 177 | && !empty($subscriber['organization']['company_id'])) { |
178 | 178 | // Imported data has a company id, we use that instead of name |
179 | 179 | $qb->add_constraint($schema->get_field('company_id')['storage']['location'], '=', $subscriber['organization']['company_id']); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | // Seek by official name |
182 | 182 | $qb->add_constraint('official', '=', $subscriber['organization']['official']); |
183 | 183 | |
184 | - if ( $schema->has_field('city') |
|
184 | + if ($schema->has_field('city') |
|
185 | 185 | && !empty($subscriber['organization']['city'])) { |
186 | 186 | // Imported data has a city, we use also that for matching |
187 | 187 | $qb->add_constraint($schema->get_field('city')['storage']['location'], '=', $subscriber['organization']['city']); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | echo " <th>{$type}</th>\n"; |
35 | 35 | echo " <td style=\"text-align: right;\">" . number_format($count) . "</td>\n"; |
36 | 36 | if (isset($cleanups_kept[$type])) { |
37 | - echo " <td style=\"text-align: right;\">" . number_format($cleanups_kept[$type]) ."</td>\n"; |
|
37 | + echo " <td style=\"text-align: right;\">" . number_format($cleanups_kept[$type]) . "</td>\n"; |
|
38 | 38 | } |
39 | 39 | echo " </tr>\n"; |
40 | 40 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | $button_config[MIDCOM_TOOLBAR_URL] = $url; |
74 | 74 | //The constants are numeric, so array_merge won't work... |
75 | 75 | foreach ($options as $key => $value) { |
76 | - if ( is_array($value) |
|
76 | + if (is_array($value) |
|
77 | 77 | && !empty($button_config[$key])) { |
78 | 78 | $value = array_merge($button_config[$key], $value); |
79 | 79 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | include dirname(__DIR__) . '/config-default.inc.php'; |
24 | 24 | } |
25 | 25 | |
26 | -if (! defined('MIDCOM_STATIC_URL')) { |
|
26 | +if (!defined('MIDCOM_STATIC_URL')) { |
|
27 | 27 | define('MIDCOM_STATIC_URL', '/midcom-static'); |
28 | 28 | } |
29 | 29 |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | $this->_add_visibility_checks(); |
107 | 107 | |
108 | - if ( empty($this->_limit) |
|
108 | + if (empty($this->_limit) |
|
109 | 109 | && empty($this->_offset)) { |
110 | 110 | // No point to do windowing |
111 | 111 | $newresult = $this->_execute_and_check_privileges(); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | $this->_query->set_limit($window_size); |
152 | 152 | |
153 | - while ( ($resultset = $this->_execute_and_check_privileges()) |
|
153 | + while (($resultset = $this->_execute_and_check_privileges()) |
|
154 | 154 | || $this->denied > $denied) { |
155 | 155 | $size = count($resultset); |
156 | 156 | $total_size = $size + ($this->denied - $denied); |
@@ -25,7 +25,8 @@ |
||
25 | 25 | { |
26 | 26 | try { |
27 | 27 | $viewer->register_plugin_namespace('__feeds', ['rss' => ['class' => __CLASS__]]); |
28 | - } catch (midcom_error $e) { |
|
28 | + } |
|
29 | + catch (midcom_error $e) { |
|
29 | 30 | $e->log(); |
30 | 31 | } |
31 | 32 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | } |
74 | 74 | } |
75 | 75 | |
76 | - if ( $this->_topic->can_do('midgard:update') |
|
76 | + if ($this->_topic->can_do('midgard:update') |
|
77 | 77 | && $this->_topic->can_do('midcom:component_config')) { |
78 | 78 | $buttons[] = $workflow->get_button('config/', [ |
79 | 79 | MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'), |
@@ -94,7 +94,7 @@ |
||
94 | 94 | 'midcom' => [ |
95 | 95 | 'style-init' => '', |
96 | 96 | 'style-finish' => '', |
97 | - ] |
|
97 | + ] |
|
98 | 98 | ], |
99 | 99 | 'nodes' => [], |
100 | 100 | ]; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | public function __construct(array &$data) |
24 | 24 | { |
25 | - $this->_data =& $data; |
|
25 | + $this->_data = & $data; |
|
26 | 26 | midcom::get()->head->enable_jquery_ui(['accordion']); |
27 | 27 | } |
28 | 28 | |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | return; |
33 | 33 | } |
34 | 34 | |
35 | - if ( midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style') |
|
36 | - && ( $this->_data['handler_id'] !== 'object_create' |
|
35 | + if (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style') |
|
36 | + && ($this->_data['handler_id'] !== 'object_create' |
|
37 | 37 | || $this->_data['current_type'] == 'midgard_element')) { |
38 | 38 | // Suggest element names to create under a style |
39 | 39 | $this->_data['help_style_elementnames'] = $this->_get_style_elements_and_nodes($this->_data['object']->id); |
40 | 40 | midcom_show_style('midgard_admin_asgard_stylehelper_elementnames'); |
41 | 41 | |
42 | - } elseif ( midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element') |
|
42 | + } elseif (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element') |
|
43 | 43 | && $this->_get_help_element()) { |
44 | 44 | midcom_show_style('midgard_admin_asgard_stylehelper_element'); |
45 | 45 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | private function _get_help_element() : bool |
49 | 49 | { |
50 | - if ( empty($this->_data['object']->name) |
|
50 | + if (empty($this->_data['object']->name) |
|
51 | 51 | || empty($this->_data['object']->style)) { |
52 | 52 | // We cannot help with empty elements |
53 | 53 | return false; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | ]); |
55 | 55 | } |
56 | 56 | |
57 | - if ( midcom::get()->config->get('midcom_services_rcs_enable') |
|
57 | + if (midcom::get()->config->get('midcom_services_rcs_enable') |
|
58 | 58 | && $object->can_do('midgard:update') |
59 | 59 | && $object->_use_rcs) { |
60 | 60 | $buttons[] = [ |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | $icon = 'stock-icons/16x16/page-' . $icontype . '.png'; |
87 | - if ( !midcom::get()->config->get('show_hidden_objects') |
|
87 | + if (!midcom::get()->config->get('show_hidden_objects') |
|
88 | 88 | && !$object->metadata->is_visible()) { |
89 | 89 | // Take scheduling into account |
90 | 90 | $icon = 'stock-icons/16x16/page-' . $icontype . '-notpublished.png'; |