@@ -93,7 +93,7 @@ |
||
| 93 | 93 | if ($object instanceof midcom_db_attachment) { |
| 94 | 94 | // Faster linking to attachments |
| 95 | 95 | $parent = $object->get_parent(); |
| 96 | - if ( is_a($parent, midcom_db_topic::class) |
|
| 96 | + if (is_a($parent, midcom_db_topic::class) |
|
| 97 | 97 | && $nav->is_node_in_tree($parent->id, $nav->get_root_node())) { |
| 98 | 98 | $napobj = $nav->get_node($parent->id); |
| 99 | 99 | return $napobj[MIDCOM_NAV_FULLURL] . $object->name; |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $toolbar = new midcom_helper_toolbar(); |
| 19 | 19 | $buttons = []; |
| 20 | - if ( midcom::get()->auth->user |
|
| 20 | + if (midcom::get()->auth->user |
|
| 21 | 21 | && $comment->status < net_nehmer_comments_comment::MODERATED) { |
| 22 | 22 | if (!$comment->can_do('net.nehmer.comments:moderation')) { |
| 23 | 23 | // Regular users can only report abuse |
@@ -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/', |
@@ -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 { |