@@ -7,7 +7,7 @@ |
||
7 | 7 | $link = $data['router']->generate('components_component', ['component' => $component]); |
8 | 8 | |
9 | 9 | echo "<li class=\"component\">"; |
10 | - echo "<a href=\"{$link}\">" . midcom::get()->i18n->get_string($component, $component) ." </a>\n"; |
|
10 | + echo "<a href=\"{$link}\">" . midcom::get()->i18n->get_string($component, $component) . " </a>\n"; |
|
11 | 11 | echo "<ul>\n"; |
12 | 12 | foreach ($elements as $name => $path) { |
13 | 13 | echo "<li>"; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | private function _populate_node_toolbar() |
22 | 22 | { |
23 | - if ( $this->_topic->can_do('midgard:update') |
|
23 | + if ($this->_topic->can_do('midgard:update') |
|
24 | 24 | && $this->_topic->can_do('midcom:component_config')) { |
25 | 25 | $workflow = $this->get_workflow('datamanager'); |
26 | 26 | $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [ |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | $search_config = org_openpsa_widgets_ui::get_search_providers(); |
3 | -if ( array_key_exists('org.openpsa.documents', $search_config) |
|
3 | +if (array_key_exists('org.openpsa.documents', $search_config) |
|
4 | 4 | && midcom::get()->indexer->enabled()) { |
5 | 5 | $url = $data['router']->generate('search'); ?> |
6 | 6 | <div class="area" id="document_search"> |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | $this->_view_toolbar->add_items($buttons); |
60 | 60 | |
61 | - if ( $this->_topic->can_do('midgard:update') |
|
61 | + if ($this->_topic->can_do('midgard:update') |
|
62 | 62 | && $this->_topic->can_do('midcom:component_config')) { |
63 | 63 | $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [ |
64 | 64 | MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'), |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | ]; |
49 | 49 | } |
50 | 50 | |
51 | - if ( midcom::get()->auth->can_user_do('midgard:create', null, org_openpsa_contacts_person_dba::class) |
|
51 | + if (midcom::get()->auth->can_user_do('midgard:create', null, org_openpsa_contacts_person_dba::class) |
|
52 | 52 | && $this->group->can_do('midgard:create')) { |
53 | 53 | $buttons[] = $workflow->get_button($this->router->generate('person_new_group', ['guid' => $this->group->guid]), [ |
54 | 54 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('create person'), |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | $siteconfig = org_openpsa_core_siteconfig::get_instance(); |
60 | 60 | $user_url = $siteconfig->get_node_full_url('org.openpsa.user'); |
61 | - if ( $user_url |
|
61 | + if ($user_url |
|
62 | 62 | && midcom::get()->auth->can_user_do('org.openpsa.user:access', null, org_openpsa_user_interface::class)) { |
63 | 63 | $buttons[] = [ |
64 | 64 | MIDCOM_TOOLBAR_URL => $user_url . "group/{$this->group->guid}/", |
@@ -171,7 +171,7 @@ |
||
171 | 171 | { |
172 | 172 | $this->prepare_toolbar(false); |
173 | 173 | |
174 | - if ( $this->_topic->can_do('midgard:update') |
|
174 | + if ($this->_topic->can_do('midgard:update') |
|
175 | 175 | && $this->_topic->can_do('midcom:component_config')) { |
176 | 176 | $workflow = $this->get_workflow('datamanager'); |
177 | 177 | $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [ |
@@ -67,7 +67,7 @@ |
||
67 | 67 | MIDCOM_TOOLBAR_ACCESSKEY => 'e', |
68 | 68 | ]); |
69 | 69 | |
70 | - if ( $this->task->reportedHours == 0 |
|
70 | + if ($this->task->reportedHours == 0 |
|
71 | 71 | && $this->task->can_do('midgard:delete')) { |
72 | 72 | $delete_workflow = $this->get_workflow('delete', ['object' => $this->task]); |
73 | 73 | $buttons[] = $delete_workflow->get_button($this->router->generate('task_delete', ['guid' => $this->task->guid])); |
@@ -169,7 +169,7 @@ |
||
169 | 169 | case 'proposed': |
170 | 170 | $html = $this->render_status($task->manager, "from %s"); |
171 | 171 | $task->get_members(); |
172 | - if ( $task->can_do('midgard:update') |
|
172 | + if ($task->can_do('midgard:update') |
|
173 | 173 | && isset($task->resources[midcom_connection::get_user()])) { |
174 | 174 | $html .= '<form method="post" action="' . $this->router->generate('workflow', ['guid' => $task->guid]) . '">'; |
175 | 175 | //TODO: If we need all resources to accept task hide tools when we have accepted and replace with "pending acceptance from..." |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | - if ( empty($input) |
|
37 | - || ( $input instanceof DateTime |
|
36 | + if (empty($input) |
|
37 | + || ($input instanceof DateTime |
|
38 | 38 | && $input->format('Y-m-d H:i:s') == '0001-01-01 00:00:00')) { |
39 | 39 | return $result; |
40 | 40 | } |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | throw new TransformationFailedException('Expected an array.'); |
60 | 60 | } |
61 | 61 | |
62 | - if ( empty($array['date']) |
|
63 | - || ( $array['date'] instanceof DateTime |
|
62 | + if (empty($array['date']) |
|
63 | + || ($array['date'] instanceof DateTime |
|
64 | 64 | && $array['date']->format('Y-m-d H:i:s') == '0001-01-01 00:00:00')) { |
65 | 65 | return; |
66 | 66 | } |