@@ -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')); |
@@ -192,7 +192,7 @@ |
||
| 192 | 192 | return false; |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - if ( !empty($this->_old_username) |
|
| 195 | + if (!empty($this->_old_username) |
|
| 196 | 196 | && $this->_old_username !== $new_username) { |
| 197 | 197 | $history = @unserialize($this->_person->get_parameter('midcom', 'username_history')) ?: []; |
| 198 | 198 | $history[time()] = ['old' => $this->_old_username, 'new' => $new_username]; |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - if ( !$request->request->has('midcom_services_auth_frontend_form_submit') |
|
| 49 | + if (!$request->request->has('midcom_services_auth_frontend_form_submit') |
|
| 50 | 50 | || !$request->request->has('username') |
| 51 | 51 | || !$request->request->has('password')) { |
| 52 | 52 | return null; |
@@ -181,7 +181,8 @@ |
||
| 181 | 181 | if ($this->_response === null) { |
| 182 | 182 | $this->_stop('Could not handle request, unknown method', Response::HTTP_METHOD_NOT_ALLOWED); |
| 183 | 183 | } |
| 184 | - } catch (midcom_error $e) { |
|
| 184 | + } |
|
| 185 | + catch (midcom_error $e) { |
|
| 185 | 186 | $this->_responseStatus = $e->getCode(); |
| 186 | 187 | return $this->_send_response($e->getMessage()); |
| 187 | 188 | } |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | midcom::get()->auth->require_admin_user(); |
| 5 | 5 | $post = Request::createFromGlobals()->request; |
| 6 | 6 | |
| 7 | -if ( !$post->get('to') |
|
| 7 | +if (!$post->get('to') |
|
| 8 | 8 | || !$post->get('from')) { |
| 9 | 9 | ?> |
| 10 | 10 | <h2>Send test email</h2> |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <div class="area org_openpsa_helper_box"> |
| 2 | -<h3><?php echo $data['l10n']->get('folders');?></h3> |
|
| 2 | +<h3><?php echo $data['l10n']->get('folders'); ?></h3> |
|
| 3 | 3 | <?php |
| 4 | 4 | $nap = new midcom_helper_nav(); |
| 5 | 5 | $current_node = $nap->get_node($nap->get_current_node()); |
| 6 | 6 | $url = $current_node[MIDCOM_NAV_RELATIVEURL]; |
| 7 | -midcom::get()->dynamic_load($url. "directory/navigation/"); |
|
| 7 | +midcom::get()->dynamic_load($url . "directory/navigation/"); |
|
| 8 | 8 | ?> |
| 9 | 9 | </div> |
| 10 | 10 | \ No newline at end of file |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | midcom::get()->auth->require_admin_user(); |
| 5 | 5 | $post = Request::createFromGlobals()->request; |
| 6 | 6 | |
| 7 | -if ( !$post->get('to') |
|
| 7 | +if (!$post->get('to') |
|
| 8 | 8 | || !$post->get('from')) { |
| 9 | 9 | ?> |
| 10 | 10 | <h2>Send test email</h2> |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | $entries = array_merge($this->get_status_entries(), $this->get_journal_entries()); |
| 64 | 64 | |
| 65 | - usort($entries, function (array $a, array $b) { |
|
| 65 | + usort($entries, function(array $a, array $b) { |
|
| 66 | 66 | if ($a['timestamp'] == $b['timestamp']) { |
| 67 | 67 | return $b['order'] <=> $a['order']; |
| 68 | 68 | } |
@@ -92,8 +92,8 @@ discard block |
||
| 92 | 92 | 'order' => 3 |
| 93 | 93 | ]; |
| 94 | 94 | } |
| 95 | - if ( $this->invoice->due |
|
| 96 | - && ( ( $this->invoice->due < time() |
|
| 95 | + if ($this->invoice->due |
|
| 96 | + && (($this->invoice->due < time() |
|
| 97 | 97 | && $this->invoice->paid == 0) |
| 98 | 98 | || $this->invoice->due < $this->invoice->paid)) { |
| 99 | 99 | $entries[] = [ |