@@ -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(); ?>"> |
@@ -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 | } |
@@ -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 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | public function _on_creating() : bool |
27 | 27 | { |
28 | - if ( $this->invoice |
|
28 | + if ($this->invoice |
|
29 | 29 | && $this->position == 0) { |
30 | 30 | $invoice = org_openpsa_invoices_invoice_dba::get_cached($this->invoice); |
31 | 31 | $this->position = count($invoice->get_invoice_items()) + 1; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | } catch (midcom_error $e) { |
76 | 76 | } |
77 | 77 | } |
78 | - if ( $url == '' |
|
78 | + if ($url == '' |
|
79 | 79 | && $sales_url) { |
80 | 80 | try { |
81 | 81 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $invoice = new org_openpsa_invoices_invoice_dba($this->invoice); |
98 | 98 | $old_sum = $invoice->sum; |
99 | 99 | self::update_invoice($invoice); |
100 | - if ( $old_sum != $invoice->sum |
|
100 | + if ($old_sum != $invoice->sum |
|
101 | 101 | && !empty($this->deliverable)) { |
102 | 102 | $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable); |
103 | 103 | self::update_deliverable($deliverable); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | if ($invoiced != $deliverable->invoiced) { |
137 | 137 | $deliverable->invoiced = $invoiced; |
138 | - if ( $deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
138 | + if ($deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
139 | 139 | && $deliverable->state < org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED) { |
140 | 140 | $deliverable->state = org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED; |
141 | 141 | } |
@@ -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'), |
@@ -25,7 +25,8 @@ discard block |
||
25 | 25 | midcom::get()->auth->request_sudo($this->_component); |
26 | 26 | try { |
27 | 27 | $person = new midcom_db_person($args['guid']); |
28 | - } catch (midcom_error $e) { |
|
28 | + } |
|
29 | + catch (midcom_error $e) { |
|
29 | 30 | $handler->print_error('Person with guid #' . $args['guid'] . ' does not exist'); |
30 | 31 | midcom::get()->auth->drop_sudo(); |
31 | 32 | return false; |
@@ -33,7 +34,8 @@ discard block |
||
33 | 34 | $accounthelper = new org_openpsa_user_accounthelper($person); |
34 | 35 | try { |
35 | 36 | $accounthelper->reopen_account(); |
36 | - } catch (midcom_error $e) { |
|
37 | + } |
|
38 | + catch (midcom_error $e) { |
|
37 | 39 | $handler->print_error($e->getMessage()); |
38 | 40 | midcom::get()->auth->drop_sudo(); |
39 | 41 | return false; |
@@ -63,7 +63,7 @@ |
||
63 | 63 | public function _on_created() |
64 | 64 | { |
65 | 65 | //Remove the resource if necessary |
66 | - if ( $this->type == self::DECLINED |
|
66 | + if ($this->type == self::DECLINED |
|
67 | 67 | && $this->targetPerson) { |
68 | 68 | $qb = org_openpsa_projects_task_resource_dba::new_query_builder(); |
69 | 69 | $qb->add_constraint('task', '=', $this->task); |
@@ -95,7 +95,8 @@ |
||
95 | 95 | org_openpsa_projects_workflow::accept($task, 0, $this->comment); |
96 | 96 | return; |
97 | 97 | } |
98 | - } catch (midcom_error $e) { |
|
98 | + } |
|
99 | + catch (midcom_error $e) { |
|
99 | 100 | $e->log(); |
100 | 101 | } |
101 | 102 | } |