@@ -114,7 +114,8 @@ discard block |
||
| 114 | 114 | foreach ($hours as $guid => $row) { |
| 115 | 115 | try { |
| 116 | 116 | $task = org_openpsa_projects_task_dba::get_cached($row['task']); |
| 117 | - } catch (midcom_error $e) { |
|
| 117 | + } |
|
| 118 | + catch (midcom_error $e) { |
|
| 118 | 119 | // Task couldn't be loaded, probably because of ACL |
| 119 | 120 | continue; |
| 120 | 121 | } |
@@ -127,7 +128,8 @@ discard block |
||
| 127 | 128 | $person_object = org_openpsa_contacts_person_dba::get_cached($row['person']); |
| 128 | 129 | $person_label = $this->_get_list_link($person_object->name, null, null, $row['person']); |
| 129 | 130 | $person_name = $person_object->name; |
| 130 | - } catch (midcom_error $e) { |
|
| 131 | + } |
|
| 132 | + catch (midcom_error $e) { |
|
| 131 | 133 | $person_label = $this->_l10n->get('no person'); |
| 132 | 134 | $person_name = ''; |
| 133 | 135 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | // Catch first the configuration option for showing editing interface instead |
| 37 | 37 | // of redirecting administrators |
| 38 | - if ( $this->_topic->can_do('net.nemein.redirector:noredirect') |
|
| 38 | + if ($this->_topic->can_do('net.nemein.redirector:noredirect') |
|
| 39 | 39 | && !$this->_config->get('admin_redirection')) { |
| 40 | 40 | return new midcom_response_relocate("{$this->_topic->name}/edit/{$args[0]}/"); |
| 41 | 41 | } |
@@ -108,12 +108,12 @@ |
||
| 108 | 108 | $this->_master = $master; |
| 109 | 109 | $this->router = $router; |
| 110 | 110 | |
| 111 | - $this->_request_data =& $master->_request_data; |
|
| 111 | + $this->_request_data = & $master->_request_data; |
|
| 112 | 112 | $this->_topic = $master->_topic; |
| 113 | 113 | |
| 114 | 114 | // Load component specific stuff, special treatment if the handler has |
| 115 | 115 | // a component different than the master handler set. |
| 116 | - if ( $this->_component |
|
| 116 | + if ($this->_component |
|
| 117 | 117 | && $this->_component != $master->_component) { |
| 118 | 118 | $this->_config->store_from_object($this->_topic, $this->_component, true); |
| 119 | 119 | } else { |
@@ -5,13 +5,13 @@ |
||
| 5 | 5 | ?> |
| 6 | 6 | <form method='get' name='midcom_helper_search_form' action='&(action);' class='midcom.helper.search'> |
| 7 | 7 | <label for="midcom_helper_search_query"> |
| 8 | -<?php echo $data['l10n']->get('query');?>: |
|
| 8 | +<?php echo $data['l10n']->get('query'); ?>: |
|
| 9 | 9 | <input type='text' size='60' name='query' id='midcom_helper_search_query' value=&(query:h); /> |
| 10 | 10 | </label> |
| 11 | 11 | <input type='hidden' name='type' value='basic' /> |
| 12 | 12 | <input type='hidden' name='page' value='1' /> |
| 13 | -<input type='submit' name='submit' value='<?php echo $data['l10n']->get('search');?>' /> |
|
| 13 | +<input type='submit' name='submit' value='<?php echo $data['l10n']->get('search'); ?>' /> |
|
| 14 | 14 | </form> |
| 15 | 15 | <p> |
| 16 | - <a href="&(advanced);&(data['params']);"><?php echo $data['l10n']->get('advanced search');?></a> |
|
| 16 | + <a href="&(advanced);&(data['params']);"><?php echo $data['l10n']->get('advanced search'); ?></a> |
|
| 17 | 17 | </p> |
| 18 | 18 | \ No newline at end of file |
@@ -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>"; |
@@ -61,7 +61,8 @@ |
||
| 61 | 61 | { |
| 62 | 62 | try { |
| 63 | 63 | $this->_object = midcom::get()->dbfactory->get_object_by_guid($guid); |
| 64 | - } catch (midcom_error $e) { |
|
| 64 | + } |
|
| 65 | + catch (midcom_error $e) { |
|
| 65 | 66 | if (midcom_connection::get_error() == MGD_ERR_OBJECT_DELETED) { |
| 66 | 67 | $relocate = $this->router->generate('object_deleted', ['guid' => $guid]); |
| 67 | 68 | midcom::get()->relocate($relocate); |
@@ -223,10 +223,10 @@ |
||
| 223 | 223 | $new_type_reflector = midcom_helper_reflector::get($new_type); |
| 224 | 224 | $link_properties = $new_type_reflector->get_link_properties(); |
| 225 | 225 | foreach ($link_properties as $property => $link) { |
| 226 | - if ( ($link['class'] && midcom_helper_reflector::is_same_class($link['class'], $this->_object->__mgdschema_class_name__)) |
|
| 226 | + if (($link['class'] && midcom_helper_reflector::is_same_class($link['class'], $this->_object->__mgdschema_class_name__)) |
|
| 227 | 227 | || $link['type'] == MGD_TYPE_GUID) { |
| 228 | 228 | $defaults[$property] = $this->_object->{$link['target']}; |
| 229 | - } elseif ( $property == $parent_property |
|
| 229 | + } elseif ($property == $parent_property |
|
| 230 | 230 | && midcom_helper_reflector::is_same_class($new_type, $this->_object->__mgdschema_class_name__)) { |
| 231 | 231 | $defaults[$property] = $this->_object->$parent_property; |
| 232 | 232 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | echo '<span class="toolbar_label">' . $data['l10n_midcom']->get('delete') . '</span></a></li>'; |
| 27 | 27 | if ( midcom::get()->config->get('auth_allow_trusted') === true |
| 28 | 28 | && $data['person']->can_do('org.openpsa.user:su')) { |
| 29 | - echo '<li><a class="button" href="' . $data['router']->generate('account_su', ['guid' => $data['person']->guid]) . '" />' . $data['l10n']->get('switch to user') . "</a></li>\n"; |
|
| 29 | + echo '<li><a class="button" href="' . $data['router']->generate('account_su', ['guid' => $data['person']->guid]) . '" />' . $data['l10n']->get('switch to user') . "</a></li>\n"; |
|
| 30 | 30 | } |
| 31 | 31 | echo "</ul>\n"; |
| 32 | 32 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $formatter = $data['l10n']->get_formatter(); |
| 14 | 14 | echo '<p>' . $data['l10n']->get('last login') . ': ' . $formatter->datetime($lastlogin) . "</p>\n"; |
| 15 | 15 | } |
| 16 | - if ( $data['person']->id == midcom_connection::get_user() |
|
| 16 | + if ($data['person']->id == midcom_connection::get_user() |
|
| 17 | 17 | || midcom::get()->auth->can_user_do('org.openpsa.user:manage', null, org_openpsa_user_interface::class)) { |
| 18 | 18 | $workflow = new midcom\workflow\datamanager; |
| 19 | 19 | echo '<ul class="area_toolbar">'; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | 'object' => $data['person'], |
| 23 | 23 | 'label' => $data['l10n']->get('account') |
| 24 | 24 | ]); |
| 25 | - echo '<li><a href="' . $data['router']->generate('account_delete', ['guid' => $data['person']->guid]). '" ' . $workflow->render_attributes() . '" class="button">'; |
|
| 25 | + echo '<li><a href="' . $data['router']->generate('account_delete', ['guid' => $data['person']->guid]) . '" ' . $workflow->render_attributes() . '" class="button">'; |
|
| 26 | 26 | echo '<span class="toolbar_label">' . $data['l10n_midcom']->get('delete') . '</span></a></li>'; |
| 27 | - if ( midcom::get()->config->get('auth_allow_trusted') === true |
|
| 27 | + if (midcom::get()->config->get('auth_allow_trusted') === true |
|
| 28 | 28 | && $data['person']->can_do('org.openpsa.user:su')) { |
| 29 | 29 | echo '<li><a class="button" href="' . $data['router']->generate('account_su', ['guid' => $data['person']->guid]) . '" />' . $data['l10n']->get('switch to user') . "</a></li>\n"; |
| 30 | 30 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | } else { |
| 34 | 34 | echo '<p><span class="metadata">' . $data['l10n']->get("no account") . '</span></p>'; |
| 35 | - if ( $data['person']->id == midcom_connection::get_user() |
|
| 35 | + if ($data['person']->id == midcom_connection::get_user() |
|
| 36 | 36 | || midcom::get()->auth->can_user_do('org.openpsa.user:manage', null, org_openpsa_user_interface::class)) { |
| 37 | 37 | $workflow = new midcom\workflow\datamanager; |
| 38 | 38 | echo '<ul class="area_toolbar">'; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $this->add_breadcrumb('', $this->_person->get_label()); |
| 37 | 37 | |
| 38 | 38 | $auth = midcom::get()->auth; |
| 39 | - if ( $this->_person->id == midcom_connection::get_user() |
|
| 39 | + if ($this->_person->id == midcom_connection::get_user() |
|
| 40 | 40 | || $auth->can_user_do('org.openpsa.user:manage', null, org_openpsa_user_interface::class)) { |
| 41 | 41 | $buttons = []; |
| 42 | 42 | $workflow = $this->get_workflow('datamanager'); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $delete_workflow = $this->get_workflow('delete', ['object' => $this->_person]); |
| 50 | 50 | $buttons[] = $delete_workflow->get_button($this->router->generate('user_delete', ['guid' => $this->_person->guid])); |
| 51 | 51 | } |
| 52 | - if ( midcom_connection::is_user($this->_person) |
|
| 52 | + if (midcom_connection::is_user($this->_person) |
|
| 53 | 53 | && $this->_person->can_do('midgard:privileges')) { |
| 54 | 54 | $buttons[] = $workflow->get_button($this->router->generate('user_privileges', ['guid' => $this->_person->guid]), [ |
| 55 | 55 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get("permissions"), |
@@ -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'), [ |