@@ -194,7 +194,7 @@ |
||
194 | 194 | return false; |
195 | 195 | } |
196 | 196 | |
197 | - if ( !empty($this->_old_username) |
|
197 | + if (!empty($this->_old_username) |
|
198 | 198 | && $this->_old_username !== $new_username) { |
199 | 199 | if (!$history = @unserialize($this->_person->get_parameter('midcom', 'username_history'))) { |
200 | 200 | $history = []; |
@@ -90,7 +90,7 @@ |
||
90 | 90 | { |
91 | 91 | if ($this->invoiceable) { |
92 | 92 | $task = new org_openpsa_projects_task_dba($this->task); |
93 | - $time_slot = (float)$task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot'); |
|
93 | + $time_slot = (float) $task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot'); |
|
94 | 94 | if (empty($time_slot)) { |
95 | 95 | $time_slot = (float) midcom_baseclasses_components_configuration::get('org.openpsa.projects', 'config')->get('default_minimum_time_slot'); |
96 | 96 | if (empty($time_slot)) { |
@@ -174,7 +174,7 @@ |
||
174 | 174 | } |
175 | 175 | if (!midcom::get()->auth->admin) { |
176 | 176 | $user_id = midcom::get()->auth->acl->get_user_id(); |
177 | - if ( !$this->data[$type . '_guid'] |
|
177 | + if (!$this->data[$type . '_guid'] |
|
178 | 178 | || !midcom::get()->auth->acl->can_do_byguid('midgard:read', $this->data[$type . '_guid'], midcom_db_topic::class, $user_id)) { |
179 | 179 | return null; |
180 | 180 | } |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | $config = array_merge($defaults, $config); |
40 | 40 | |
41 | 41 | $node_url = $siteconfig->get_node_full_url($component); |
42 | - if ( $node_url |
|
43 | - && ( !$user_id |
|
42 | + if ($node_url |
|
43 | + && (!$user_id |
|
44 | 44 | || midcom::get()->auth->acl->can_do_byguid('midgard:read', $siteconfig->get_node_guid($component), midcom_db_topic::class, $user_id))) { |
45 | 45 | $providers[] = [ |
46 | 46 | 'placeholder' => midcom::get()->i18n->get_string('search title', $component), |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | echo '<div id="tabs">'; |
116 | 116 | echo "\n<ul>\n"; |
117 | 117 | foreach ($tabdata as $key => $tab) { |
118 | - echo "<li><a id='key_" . $key ."' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>"; |
|
118 | + echo "<li><a id='key_" . $key . "' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>"; |
|
119 | 119 | } |
120 | 120 | echo "\n</ul>\n"; |
121 | 121 | echo "</div>\n"; |
@@ -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 { |