@@ -62,7 +62,7 @@ |
||
62 | 62 | 'purge' => true |
63 | 63 | ] |
64 | 64 | ]); |
65 | - if ( midcom::get()->config->get('midcom_services_rcs_enable') |
|
65 | + if (midcom::get()->config->get('midcom_services_rcs_enable') |
|
66 | 66 | && $object->can_do('midgard:update') |
67 | 67 | && $object->_use_rcs) { |
68 | 68 | $this->_request_data['asgard_toolbar']->add_item([ |
@@ -29,7 +29,7 @@ |
||
29 | 29 | return parent::load_object($guid); |
30 | 30 | } catch (midcom_error_midgard $e) { |
31 | 31 | $mgd_exception = $e->getPrevious(); |
32 | - if ( $mgd_exception |
|
32 | + if ($mgd_exception |
|
33 | 33 | && $mgd_exception->getCode() == mgd_exception::OBJECT_DELETED) { |
34 | 34 | return $this->load_deleted($guid); |
35 | 35 | } |
@@ -27,7 +27,8 @@ |
||
27 | 27 | { |
28 | 28 | try { |
29 | 29 | return parent::load_object($guid); |
30 | - } catch (midcom_error_midgard $e) { |
|
30 | + } |
|
31 | + catch (midcom_error_midgard $e) { |
|
31 | 32 | $mgd_exception = $e->getPrevious(); |
32 | 33 | if ( $mgd_exception |
33 | 34 | && $mgd_exception->getCode() == mgd_exception::OBJECT_DELETED) { |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | $classes = []; |
203 | 203 | |
204 | 204 | if ($item[MIDCOM_NAV_TYPE] === 'node') { |
205 | - if ( $item[MIDCOM_NAV_ID] === $this->_nap->get_current_node() |
|
206 | - && ( !$this->_nap->get_current_leaf() |
|
205 | + if ($item[MIDCOM_NAV_ID] === $this->_nap->get_current_node() |
|
206 | + && (!$this->_nap->get_current_leaf() |
|
207 | 207 | || !$this->_nap->get_leaf($this->_nap->get_current_leaf()))) { |
208 | 208 | $classes[] = $this->css_active; |
209 | 209 | } |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | } |
234 | 234 | |
235 | 235 | // Add information about the object's status |
236 | - if ( $this->object_status_to_class |
|
236 | + if ($this->object_status_to_class |
|
237 | 237 | && isset($item[MIDCOM_NAV_OBJECT]) |
238 | 238 | && $css_status_class = midcom::get()->metadata->get_object_classes($item[MIDCOM_NAV_OBJECT])) { |
239 | 239 | $classes[] = $css_status_class; |
@@ -253,11 +253,11 @@ discard block |
||
253 | 253 | echo "<a href=\"{$item[MIDCOM_NAV_ABSOLUTEURL]}\"{$link_class}>" . htmlspecialchars($item[MIDCOM_NAV_NAME]) . "</a>"; |
254 | 254 | // If either of the follow nodes switches is on, follow all the nodes |
255 | 255 | |
256 | - if ( $item[MIDCOM_NAV_TYPE] === 'node' |
|
257 | - && ( $this->list_levels === 0 |
|
256 | + if ($item[MIDCOM_NAV_TYPE] === 'node' |
|
257 | + && ($this->list_levels === 0 |
|
258 | 258 | || $this->_level < $this->list_levels)) { |
259 | - if ( $this->follow_all |
|
260 | - || ( $this->follow_selected |
|
259 | + if ($this->follow_all |
|
260 | + || ($this->follow_selected |
|
261 | 261 | && in_array($item[MIDCOM_NAV_ID], $this->node_path, true))) { |
262 | 262 | $this->_level++; |
263 | 263 | $this->_list_child_elements($item[MIDCOM_NAV_ID]); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $localpath = $path; |
151 | 151 | $matches['latest_parent'] = $folder_tree['/']; |
152 | 152 | $missing_levels = 0; |
153 | - while ( $localpath |
|
153 | + while ($localpath |
|
154 | 154 | && $localpath != '/') { |
155 | 155 | $localpath = dirname($localpath); |
156 | 156 | $missing_levels++; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | $root_folder = $folder; |
179 | 179 | $max = 100; |
180 | - while ( $folder[MIDCOM_NAV_COMPONENT] == 'net.nemein.wiki' |
|
180 | + while ($folder[MIDCOM_NAV_COMPONENT] == 'net.nemein.wiki' |
|
181 | 181 | && (($parent = $folder[MIDCOM_NAV_NODEID]) != -1) |
182 | 182 | && $max > 0) { |
183 | 183 | $root_folder = $folder; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | // Get parent from DB and compare to catch moves |
55 | 55 | if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) { |
56 | 56 | $parent_entry = $this->get_guid($parent->guid); |
57 | - if ( $parent_entry |
|
57 | + if ($parent_entry |
|
58 | 58 | && $parent_entry[MIDCOM_NAV_ID] != $cached_node_id) { |
59 | 59 | $this->backend->deleteItem($parent_entry[MIDCOM_NAV_ID] . '-leaves'); |
60 | 60 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $parent_id = $napobject[MIDCOM_NAV_NODEID]; |
70 | 70 | $parent_entry = $this->get_node($parent_id); |
71 | 71 | |
72 | - if ( $parent_entry |
|
72 | + if ($parent_entry |
|
73 | 73 | && array_key_exists(MIDCOM_NAV_SUBNODES, $parent_entry)) { |
74 | 74 | unset($parent_entry[MIDCOM_NAV_SUBNODES]); |
75 | 75 | $this->put_node($parent_id, $parent_entry); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) { |
80 | 80 | $parent_entry_from_object = $this->get_guid($parent->guid); |
81 | 81 | |
82 | - if ( !empty($parent_entry_from_object[MIDCOM_NAV_ID]) |
|
82 | + if (!empty($parent_entry_from_object[MIDCOM_NAV_ID]) |
|
83 | 83 | && !empty($parent_entry[MIDCOM_NAV_ID]) |
84 | 84 | && $parent_entry_from_object[MIDCOM_NAV_ID] != $parent_entry[MIDCOM_NAV_ID]) { |
85 | 85 | unset($parent_entry_from_object[MIDCOM_NAV_SUBNODES]); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | if ($object instanceof midcom_db_topic) { |
104 | 104 | return $nav->get_node($object->id); |
105 | 105 | } |
106 | - if ( ($node = $nav->find_closest_topic($object)) |
|
106 | + if (($node = $nav->find_closest_topic($object)) |
|
107 | 107 | && $nodeobject = $nav->get_node($node->id)) { |
108 | 108 | return $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id); |
109 | 109 | } |
@@ -107,7 +107,8 @@ |
||
107 | 107 | && $nodeobject = $nav->get_node($node->id)) { |
108 | 108 | return $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id); |
109 | 109 | } |
110 | - } catch (midcom_error $e) { |
|
110 | + } |
|
111 | + catch (midcom_error $e) { |
|
111 | 112 | $e->log(); |
112 | 113 | } |
113 | 114 | return null; |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <div class="content-with-sidebar"> |
2 | 2 | <div class="main"> |
3 | 3 | <?php |
4 | - $data['view']->display_view(true); |
|
4 | + $data['view']->display_view(true); |
|
5 | 5 | $prefix = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ANCHORPREFIX); |
6 | 6 | midcom::get()->dynamic_load($prefix . 'members/' . $data['group']->guid . '/'); |
7 | 7 | ?> |
@@ -87,7 +87,7 @@ |
||
87 | 87 | ]) |
88 | 88 | ->setRequired('object') |
89 | 89 | ->setAllowedTypes('object', midcom_core_dbaobject::class) |
90 | - ->setNormalizer('label', function ($options, $value) { |
|
90 | + ->setNormalizer('label', function($options, $value) { |
|
91 | 91 | return $value ?? midcom_helper_reflector::get_object_title($options['object']); |
92 | 92 | }); |
93 | 93 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $event ??= new org_openpsa_calendar_event_dba($this->eid); |
68 | 68 | |
69 | - if ( $recipient->id == midcom_connection::get_user() |
|
69 | + if ($recipient->id == midcom_connection::get_user() |
|
70 | 70 | && !$event->send_notify_me) { |
71 | 71 | //Do not send notification to current user |
72 | 72 | debug_add('event->send_notify_me is false and recipient is current user, aborting notify'); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | if (isset($events_by_date[$ymd])) { |
194 | 194 | foreach ($events_by_date[$ymd] as $event) { |
195 | - if ( $event->end <= $workday_starts_ts |
|
195 | + if ($event->end <= $workday_starts_ts |
|
196 | 196 | || $event->start >= $workday_ends_ts) { |
197 | 197 | // We need not consider this event, it is outside the defined workday |
198 | 198 | continue; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | } |
211 | 211 | } |
212 | 212 | // End of day slot |
213 | - if ( $last_end_time < $workday_ends_ts |
|
213 | + if ($last_end_time < $workday_ends_ts |
|
214 | 214 | && (($workday_ends_ts - $last_end_time) >= $amount)) { |
215 | 215 | $slots[] = self::_create_slot($last_end_time, $workday_ends_ts, $last_event); |
216 | 216 | } |
@@ -141,7 +141,8 @@ |
||
141 | 141 | debug_add('person #' . $person->id . 'has no email address, aborting'); |
142 | 142 | return null; |
143 | 143 | } |
144 | - } catch (midcom_error) { |
|
144 | + } |
|
145 | + catch (midcom_error) { |
|
145 | 146 | return null; |
146 | 147 | } |
147 | 148 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | midcom::get()->metadata->set_request_metadata($this->_topic->metadata->revised, $this->_topic->guid); |
25 | 25 | $data['node'] = $this->_topic; |
26 | 26 | |
27 | - if ( $this->_topic->id == midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC)->id |
|
27 | + if ($this->_topic->id == midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC)->id |
|
28 | 28 | && !midcom::get()->config->get('midcom_root_component')) { |
29 | 29 | // if we have an ad hoc root topic, give user some options to do the initial setup |
30 | 30 | return new midcom_response_relocate($this->router->generate('wizard')); |