@@ -52,7 +52,7 @@ |
||
52 | 52 | */ |
53 | 53 | private function _find_suspects_event(midcom_core_dbaobject $object, org_openpsa_relatedto_dba $defaults, array &$links_array) |
54 | 54 | { |
55 | - if ( !is_array($object->participants) |
|
55 | + if (!is_array($object->participants) |
|
56 | 56 | || count($object->participants) < 2) { |
57 | 57 | //We have invalid list or less than two participants, abort |
58 | 58 | return; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | public function _on_watched_dba_delete(midcom_core_dbaobject $object) |
18 | 18 | { |
19 | 19 | $qb = org_openpsa_directmarketing_campaign_member_dba::new_query_builder(); |
20 | - if ( $object instanceof midcom_db_person |
|
20 | + if ($object instanceof midcom_db_person |
|
21 | 21 | || $object instanceof org_openpsa_contacts_person_dba) { |
22 | 22 | $qb->add_constraint('person', '=', $object->id); |
23 | 23 | } elseif ($object instanceof org_openpsa_directmarketing_campaign_dba) { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | //Substyle handling |
72 | - if ( !empty($data['message_array']['substyle']) |
|
72 | + if (!empty($data['message_array']['substyle']) |
|
73 | 73 | && !preg_match('/^builtin:/', $data['message_array']['substyle'])) { |
74 | 74 | debug_add("Appending substyle {$data['message_array']['substyle']}"); |
75 | 75 | midcom::get()->style->append_substyle($data['message_array']['substyle']); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | private function _real_show_compose(array $data) |
121 | 121 | { |
122 | 122 | $prefix = ''; |
123 | - if ( !empty($data['message_array']['substyle']) |
|
123 | + if (!empty($data['message_array']['substyle']) |
|
124 | 124 | && preg_match('/^builtin:(.*)/', $data['message_array']['substyle'], $matches_style)) { |
125 | 125 | $prefix = $matches_style[1] . '-'; |
126 | 126 | } |
@@ -140,7 +140,7 @@ |
||
140 | 140 | return; |
141 | 141 | } |
142 | 142 | |
143 | - if ( !is_writable($config['filename']) |
|
143 | + if (!is_writable($config['filename']) |
|
144 | 144 | && !is_writable(dirname($config['filename']))) { |
145 | 145 | debug_add("Error logging file {$config['filename']} is not writable", MIDCOM_LOG_WARN); |
146 | 146 | return; |
@@ -199,7 +199,7 @@ |
||
199 | 199 | private function _render_line(array $link, midcom_core_dbaobject &$other_obj) |
200 | 200 | { |
201 | 201 | $this->_request_data['link'] = $link; |
202 | - $this->_request_data['other_obj'] =& $other_obj; |
|
202 | + $this->_request_data['other_obj'] = & $other_obj; |
|
203 | 203 | $this->_request_data['icon'] = midcom_helper_reflector::get_object_icon($other_obj); |
204 | 204 | |
205 | 205 | if (get_class($other_obj) != $link['class']) { |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | $year_data = []; |
132 | 132 | $first_post = $this->_compute_welcome_first_post(); |
133 | 133 | $this->_request_data['first_post'] = $first_post; |
134 | - $this->_request_data['total_count'] =& $total_count; |
|
135 | - $this->_request_data['year_data'] =& $year_data; |
|
134 | + $this->_request_data['total_count'] = & $total_count; |
|
135 | + $this->_request_data['year_data'] = & $year_data; |
|
136 | 136 | if (!$first_post) { |
137 | 137 | return; |
138 | 138 | } |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | switch ($handler_id) { |
262 | 262 | case 'archive-year-category': |
263 | 263 | $category = trim(strip_tags($args[1])); |
264 | - if ( $data['datamanager']->get_schema('default')->has_field('categories') |
|
264 | + if ($data['datamanager']->get_schema('default')->has_field('categories') |
|
265 | 265 | && !$data['datamanager']->get_schema('default')->get_field('categories')['type_config']['allow_multiple']) { |
266 | 266 | $qb->add_constraint('extra1', '=', $category); |
267 | 267 | } else { |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | throw new midcom_error_notfound("The year '{$year}' is not valid."); |
346 | 346 | } |
347 | 347 | |
348 | - if ( $month < 1 |
|
348 | + if ($month < 1 |
|
349 | 349 | || $month > 12) { |
350 | 350 | throw new midcom_error_notfound("The month {$month} is not valid."); |
351 | 351 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $result = $this->is_username_available($fields); |
48 | 48 | |
49 | 49 | $accounthelper = new org_openpsa_user_accounthelper(); |
50 | - if ($fields['password']['switch'] && !$accounthelper->check_password_strength($fields['password']['password'])){ |
|
50 | + if ($fields['password']['switch'] && !$accounthelper->check_password_strength($fields['password']['password'])) { |
|
51 | 51 | $result = ['password' => midcom::get()->i18n->get_string('password weak', 'org.openpsa.user')]; |
52 | 52 | } |
53 | 53 | |
@@ -149,10 +149,10 @@ discard block |
||
149 | 149 | $user = new midcom_db_person($fields["person"]); |
150 | 150 | |
151 | 151 | $accounthelper = new org_openpsa_user_accounthelper($user); |
152 | - if (!$accounthelper->check_password_reuse($fields['new_password'])){ |
|
152 | + if (!$accounthelper->check_password_reuse($fields['new_password'])) { |
|
153 | 153 | $result['password'] = midcom::get()->i18n->get_string('password was already used', 'org.openpsa.user'); |
154 | 154 | } |
155 | - if (!$accounthelper->check_password_strength($fields['new_password'])){ |
|
155 | + if (!$accounthelper->check_password_strength($fields['new_password'])) { |
|
156 | 156 | $result['password'] = midcom::get()->i18n->get_string('password weak', 'org.openpsa.user'); |
157 | 157 | } |
158 | 158 | return $result ?: true; |
@@ -74,7 +74,7 @@ |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | $result_cache[$cache_key] = []; |
77 | - $ret =& $result_cache[$cache_key]; |
|
77 | + $ret = & $result_cache[$cache_key]; |
|
78 | 78 | |
79 | 79 | if (empty($up)) { |
80 | 80 | // TODO: use reflection to see what kind of property this is ? |
@@ -149,7 +149,7 @@ |
||
149 | 149 | } |
150 | 150 | |
151 | 151 | $reflector = midcom_helper_reflector::get($linked_object); |
152 | - $link_html = "<a href='" . midcom::get()->permalinks->create_permalink($linked_object->guid) . "'>" . $reflector->get_object_label($linked_object) ."</a>"; |
|
152 | + $link_html = "<a href='" . midcom::get()->permalinks->create_permalink($linked_object->guid) . "'>" . $reflector->get_object_label($linked_object) . "</a>"; |
|
153 | 153 | $data['linked_objects'][$entry->linkGuid] = $link_html; |
154 | 154 | $data['linked_raw_objects'][$entry->linkGuid] = $reflector->get_object_label($linked_object); |
155 | 155 | } |