@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $prefix = $nap->get_node($this->_topic->id)[MIDCOM_NAV_ABSOLUTEURL]; |
| 35 | 35 | |
| 36 | 36 | $tree = new org_openpsa_widgets_tree(org_openpsa_contacts_group_dba::class, 'owner'); |
| 37 | - $tree->link_callback = function ($guid) use ($prefix) { |
|
| 37 | + $tree->link_callback = function($guid) use ($prefix) { |
|
| 38 | 38 | return $prefix . 'group/' . $guid . '/'; |
| 39 | 39 | }; |
| 40 | 40 | $tree->constraints[] = ['orgOpenpsaObtype', '<', org_openpsa_contacts_group_dba::MYCONTACTS]; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $my_company_guid = $this->_config->get('owner_organization'); |
| 54 | 54 | |
| 55 | - if ( empty($my_company_guid) |
|
| 55 | + if (empty($my_company_guid) |
|
| 56 | 56 | || !mgd_is_guid($my_company_guid)) { |
| 57 | 57 | if (midcom::get()->auth->admin) { |
| 58 | 58 | midcom::get()->uimessages->add( |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | if ($path === '') { |
| 66 | 66 | // Infinite loop, set an UI message and stop executing |
| 67 | - if ( !isset($schema['extends']['name']) |
|
| 67 | + if (!isset($schema['extends']['name']) |
|
| 68 | 68 | || $schema['extends']['name'] === $schema_name) { |
| 69 | 69 | throw new midcom_error('schema ' . $path . ':' . $schema_name . ' extends itself'); |
| 70 | 70 | } |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | // Approve if possible |
| 92 | - if ( $approval_status |
|
| 92 | + if ($approval_status |
|
| 93 | 93 | && $object->can_do('midcom:approve')) { |
| 94 | 94 | $object->metadata->approve(); |
| 95 | 95 | } |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $request = $request->withHeader('User-Agent', 'Midgard/' . substr(mgd_version(), 0, 4)); |
| 112 | 112 | |
| 113 | 113 | // Handle basic auth |
| 114 | - if ( !empty($username) |
|
| 114 | + if (!empty($username) |
|
| 115 | 115 | && !empty($password)) { |
| 116 | 116 | // Set basic auth |
| 117 | 117 | $request = $request->withHeader('Authorization', 'Basic ' . base64_encode($username . ':' . $password)); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | public function _on_handle($handler, array $args) |
| 28 | 28 | { |
| 29 | 29 | $buttons = []; |
| 30 | - if ( $this->_topic->can_do('midgard:update') |
|
| 30 | + if ($this->_topic->can_do('midgard:update') |
|
| 31 | 31 | && $this->_topic->can_do('midcom:component_config')) { |
| 32 | 32 | $workflow = $this->get_workflow('datamanager'); |
| 33 | 33 | $buttons[] = $workflow->get_button('config/', [ |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | MIDCOM_TOOLBAR_GLYPHICON => 'wrench', |
| 36 | 36 | ]); |
| 37 | 37 | } |
| 38 | - if ( $this->_topic->can_do('midgard:update') |
|
| 38 | + if ($this->_topic->can_do('midgard:update') |
|
| 39 | 39 | && $this->_topic->can_do('net.nehmer.comments:moderation')) { |
| 40 | 40 | $buttons[] = [ |
| 41 | 41 | MIDCOM_TOOLBAR_URL => 'moderate/reported_abuse/', |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | $count = count($data['navigation_items']); |
| 5 | 5 | |
| 6 | 6 | foreach ($data['navigation_items'] as $i => $item) { |
| 7 | - if ( isset($item[MIDCOM_NAV_SORTABLE]) |
|
| 7 | + if (isset($item[MIDCOM_NAV_SORTABLE]) |
|
| 8 | 8 | && !$item[MIDCOM_NAV_SORTABLE]) { |
| 9 | 9 | continue; |
| 10 | 10 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | // Actually we should skip all components that return the default icon as icon here! |
| 22 | - if ( isset($item[MIDCOM_NAV_COMPONENT]) |
|
| 22 | + if (isset($item[MIDCOM_NAV_COMPONENT]) |
|
| 23 | 23 | && $item[MIDCOM_NAV_COMPONENT] !== 'net.nehmer.static' |
| 24 | 24 | && $item[MIDCOM_NAV_COMPONENT] !== 'net.nehmer.blog' |
| 25 | 25 | && ($tmp = midcom::get()->componentloader->get_component_icon($item[MIDCOM_NAV_COMPONENT], false))) { |
@@ -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 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | public function __construct(array &$data) |
| 24 | 24 | { |
| 25 | - $this->_data =& $data; |
|
| 25 | + $this->_data = & $data; |
|
| 26 | 26 | midcom::get()->head->enable_jquery_ui(['accordion']); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -33,11 +33,11 @@ discard block |
||
| 33 | 33 | return; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - if ( midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style') |
|
| 37 | - && ( $this->_data['handler_id'] !== 'object_create' |
|
| 36 | + if (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style') |
|
| 37 | + && ($this->_data['handler_id'] !== 'object_create' |
|
| 38 | 38 | || $this->_data['current_type'] == 'midgard_element')) { |
| 39 | 39 | $help_element = $this->_get_help_style_elementnames($this->_data['object']); |
| 40 | - } elseif ( midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element') |
|
| 40 | + } elseif (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element') |
|
| 41 | 41 | && $this->_data['handler_id'] !== 'object_create') { |
| 42 | 42 | $help_element = $this->_get_help_element(); |
| 43 | 43 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | private function _get_help_element() |
| 51 | 51 | { |
| 52 | - if ( empty($this->_data['object']->name) |
|
| 52 | + if (empty($this->_data['object']->name) |
|
| 53 | 53 | || empty($this->_data['object']->style)) { |
| 54 | 54 | // We cannot help with empty elements |
| 55 | 55 | return; |
@@ -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 { |