@@ -3,10 +3,10 @@ |
||
3 | 3 | <table cellpadding='3'> |
4 | 4 | <thead> |
5 | 5 | <tr> |
6 | - <td><?php $data['l10n']->show('filename');?></td> |
|
7 | - <td><?php $data['l10n']->show('filedescription');?></td> |
|
8 | - <td><?php $data['l10n']->show('filetype');?></td> |
|
9 | - <td><?php $data['l10n']->show('filesize');?></td> |
|
10 | - <td><?php $data['l10n']->show('file lastmodified');?></td> |
|
6 | + <td><?php $data['l10n']->show('filename'); ?></td> |
|
7 | + <td><?php $data['l10n']->show('filedescription'); ?></td> |
|
8 | + <td><?php $data['l10n']->show('filetype'); ?></td> |
|
9 | + <td><?php $data['l10n']->show('filesize'); ?></td> |
|
10 | + <td><?php $data['l10n']->show('file lastmodified'); ?></td> |
|
11 | 11 | </tr> |
12 | 12 | </thead> |
@@ -3,7 +3,7 @@ |
||
3 | 3 | $title = $this->data['midcom_services_auth_access_denied_title']; |
4 | 4 | $login_warning = $this->data['midcom_services_auth_access_denied_login_warning']; |
5 | 5 | |
6 | -midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL.'/midcom.services.auth/style.css'); |
|
6 | +midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL . '/midcom.services.auth/style.css'); |
|
7 | 7 | ?> |
8 | 8 | <!DOCTYPE html> |
9 | 9 | <html lang="<?php echo midcom::get()->i18n->get_current_language(); ?>"> |
@@ -2,7 +2,7 @@ |
||
2 | 2 | $title = $this->data['midcom_services_auth_show_login_page_title']; |
3 | 3 | $login_warning = $this->data['midcom_services_auth_show_login_page_login_warning']; |
4 | 4 | |
5 | -midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL.'/midcom.services.auth/style.css'); |
|
5 | +midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL . '/midcom.services.auth/style.css'); |
|
6 | 6 | ?> |
7 | 7 | <!DOCTYPE html> |
8 | 8 | <html lang="<?php echo midcom::get()->i18n->get_current_language(); ?>"> |
@@ -474,7 +474,7 @@ |
||
474 | 474 | { |
475 | 475 | return |
476 | 476 | ( |
477 | - $this->string_exists($string, $this->_language) |
|
477 | + $this->string_exists($string, $this->_language) |
|
478 | 478 | || $this->string_exists($string, $this->_fallback_language) |
479 | 479 | ); |
480 | 480 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | self::$_localedb[$this->_library] = []; |
132 | 132 | } |
133 | 133 | |
134 | - $this->_stringdb =& self::$_localedb[$this->_library]; |
|
134 | + $this->_stringdb = & self::$_localedb[$this->_library]; |
|
135 | 135 | |
136 | 136 | $this->set_language(midcom::get()->i18n->get_current_language()); |
137 | 137 | } |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | private function error(string $message, string $filename, int $line) : midcom_error |
257 | 257 | { |
258 | 258 | $line++; // Array is 0-indexed |
259 | - return new midcom_error('L10n DB SYNTAX ERROR: ' . $message . ' at ' . $filename . ' ' . $line); |
|
259 | + return new midcom_error('L10n DB SYNTAX ERROR: ' . $message . ' at ' . $filename . ' ' . $line); |
|
260 | 260 | } |
261 | 261 | |
262 | 262 | /** |
@@ -407,7 +407,7 @@ |
||
407 | 407 | |
408 | 408 | $parent = $parent->get_parent_group(); |
409 | 409 | } |
410 | - */ |
|
410 | + */ |
|
411 | 411 | $this->_inheritance_chains[$id] = $inheritance_chain; |
412 | 412 | } |
413 | 413 | } |
@@ -182,7 +182,8 @@ discard block |
||
182 | 182 | } |
183 | 183 | try { |
184 | 184 | $this->_storage = new $person_class($id); |
185 | - } catch (mgd_exception $e) { |
|
185 | + } |
|
186 | + catch (mgd_exception $e) { |
|
186 | 187 | debug_add("Failed to retrieve the person ID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO); |
187 | 188 | throw new midcom_error_midgard($e, $id); |
188 | 189 | } |
@@ -230,7 +231,8 @@ discard block |
||
230 | 231 | if (mgd_is_guid($id)) { |
231 | 232 | try { |
232 | 233 | return new $person_class($id); |
233 | - } catch (mgd_exception $e) { |
|
234 | + } |
|
235 | + catch (mgd_exception $e) { |
|
234 | 236 | debug_add("Failed to retrieve the person GUID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO); |
235 | 237 | throw new midcom_error_midgard($e, $id); |
236 | 238 | } |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | $this->_inheritance_chains = []; |
359 | 359 | |
360 | 360 | foreach ($this->_direct_groups as $id => $group) { |
361 | - $this->_all_groups[$id] =& $this->_direct_groups[$id]; |
|
361 | + $this->_all_groups[$id] = & $this->_direct_groups[$id]; |
|
362 | 362 | $inheritance_chain = [$group->id]; |
363 | 363 | /** |
364 | 364 | * FIXME: Parent group members should inherit permissions from |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | |
533 | 533 | $timeout = midcom::get()->config->get('auth_login_session_timeout', 0); |
534 | 534 | $last_seen = $person->get_parameter('midcom', 'online'); |
535 | - if ( !$last_seen |
|
535 | + if (!$last_seen |
|
536 | 536 | || ($timeout > 0 && time() - $timeout > $last_seen)) { |
537 | 537 | return 'offline'; |
538 | 538 | } |
@@ -42,7 +42,8 @@ |
||
42 | 42 | } |
43 | 43 | try { |
44 | 44 | $resource = org_openpsa_calendar_resource_dba::get_cached($this->resource); |
45 | - } catch (midcom_error $e) { |
|
45 | + } |
|
46 | + catch (midcom_error $e) { |
|
46 | 47 | debug_add("Cannot fetch resource #{$this->resource} returning false", MIDCOM_LOG_INFO); |
47 | 48 | return false; |
48 | 49 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | public function _on_creating() |
20 | 20 | { |
21 | - if ( $this->invoice |
|
21 | + if ($this->invoice |
|
22 | 22 | && $this->position == 0) { |
23 | 23 | $invoice = org_openpsa_invoices_invoice_dba::get_cached($this->invoice); |
24 | 24 | $this->position = count($invoice->get_invoice_items()) + 1; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } catch (midcom_error $e) { |
70 | 70 | } |
71 | 71 | } |
72 | - if ( $url == '' |
|
72 | + if ($url == '' |
|
73 | 73 | && $sales_url) { |
74 | 74 | try { |
75 | 75 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $invoice = new org_openpsa_invoices_invoice_dba($this->invoice); |
92 | 92 | $old_sum = $invoice->sum; |
93 | 93 | self::update_invoice($invoice); |
94 | - if ( $old_sum != $invoice->sum |
|
94 | + if ($old_sum != $invoice->sum |
|
95 | 95 | && !empty($this->deliverable)) { |
96 | 96 | $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable); |
97 | 97 | self::update_deliverable($deliverable); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | if ($invoiced != $deliverable->invoiced) { |
133 | 133 | $deliverable->invoiced = $invoiced; |
134 | - if ( $deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
134 | + if ($deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
135 | 135 | && $deliverable->state < org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED) { |
136 | 136 | $deliverable->state = org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED; |
137 | 137 | } |
@@ -66,7 +66,8 @@ discard block |
||
66 | 66 | try { |
67 | 67 | $task = org_openpsa_projects_task_dba::get_cached($this->task); |
68 | 68 | $url = $projects_url . 'task/' . $task->guid . '/'; |
69 | - } catch (midcom_error $e) { |
|
69 | + } |
|
70 | + catch (midcom_error $e) { |
|
70 | 71 | } |
71 | 72 | } |
72 | 73 | if ( $url == '' |
@@ -74,7 +75,8 @@ discard block |
||
74 | 75 | try { |
75 | 76 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable); |
76 | 77 | $url = $sales_url . 'deliverable/' . $deliverable->guid . '/'; |
77 | - } catch (midcom_error $e) { |
|
78 | + } |
|
79 | + catch (midcom_error $e) { |
|
78 | 80 | } |
79 | 81 | } |
80 | 82 | if ($url != '') { |
@@ -96,7 +98,8 @@ discard block |
||
96 | 98 | $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable); |
97 | 99 | self::update_deliverable($deliverable); |
98 | 100 | } |
99 | - } catch (midcom_error $e) { |
|
101 | + } |
|
102 | + catch (midcom_error $e) { |
|
100 | 103 | $e->log(); |
101 | 104 | } |
102 | 105 | } |
@@ -77,9 +77,9 @@ |
||
77 | 77 | $filter_id = $this->_identifier . '_' . $filtername; |
78 | 78 | $user = midcom::get()->auth->user->get_storage(); |
79 | 79 | |
80 | - if ( isset($_POST['unset_filter']) |
|
80 | + if (isset($_POST['unset_filter']) |
|
81 | 81 | && $_POST['unset_filter'] == $filter_id) { |
82 | - if ( $user->get_parameter("org_openpsa_core_filter", $filter_id) |
|
82 | + if ($user->get_parameter("org_openpsa_core_filter", $filter_id) |
|
83 | 83 | && !$user->delete_parameter("org_openpsa_core_filter", $filter_id)) { |
84 | 84 | $message_content = sprintf( |
85 | 85 | $l10n->get('the handed filter for %s could not be set as parameter'), |
@@ -35,7 +35,8 @@ |
||
35 | 35 | try { |
36 | 36 | midcom::get()->dbfactory->get_object_by_guid($param->name); |
37 | 37 | $tried[$param->name] = true; |
38 | - } catch (midcom_error $e) { |
|
38 | + } |
|
39 | + catch (midcom_error $e) { |
|
39 | 40 | $tried[$param->name] = false; |
40 | 41 | } |
41 | 42 | } |