@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $item->title = $data['article']->title; |
19 | 19 | $arg = $data['article']->name ?: $data['article']->guid; |
20 | 20 | |
21 | -if ( $data['config']->get('link_to_external_url') |
|
21 | +if ($data['config']->get('link_to_external_url') |
|
22 | 22 | && !empty($data['article']->url)) { |
23 | 23 | $item->link = $data['article']->url; |
24 | 24 | } else { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $item->description .= '<div class="abstract">' . $view['abstract'] . '</div>'; |
38 | 38 | } |
39 | 39 | |
40 | -if ( array_key_exists('image', $view) |
|
40 | +if (array_key_exists('image', $view) |
|
41 | 41 | && $data['config']->get('rss_use_image')) { |
42 | 42 | $item->description .= "\n<div class=\"image\">" . $view['image'] . '</div>'; |
43 | 43 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | public function _on_initialize() |
36 | 36 | { |
37 | - $this->_request_data['page'] =& $this->_page; |
|
37 | + $this->_request_data['page'] = & $this->_page; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -216,9 +216,9 @@ discard block |
||
216 | 216 | $toc .= "\n<ol class=\"midcom_helper_toc_formatter level_{$current_list_level}\">\n"; |
217 | 217 | foreach ($headings[4] as $key => $heading) { |
218 | 218 | $anchor = 'heading-' . md5($heading); |
219 | - $tag_level =& $headings[3][$key]; |
|
220 | - $heading_code =& $headings[0][$key]; |
|
221 | - $heading_tag =& $headings[2][$key]; |
|
219 | + $tag_level = & $headings[3][$key]; |
|
220 | + $heading_code = & $headings[0][$key]; |
|
221 | + $heading_tag = & $headings[2][$key]; |
|
222 | 222 | $heading_new_code = "<a id='{$anchor}'></a>{$heading_code}"; |
223 | 223 | $content = str_replace($heading_code, $heading_new_code, $content); |
224 | 224 | if ($current_tag_level === false) { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | { |
16 | 16 | public function write_acls(midcom_core_dbaobject $object, $owner_id, $accesstype) |
17 | 17 | { |
18 | - if ( empty($owner_id) |
|
18 | + if (empty($owner_id) |
|
19 | 19 | || empty($accesstype)) { |
20 | 20 | return false; |
21 | 21 | } |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | |
64 | 64 | if ($privileges) { |
65 | 65 | foreach ($privileges as $privilege) { |
66 | - if ( !empty($needed_privileges[$privilege->privilegename]) |
|
66 | + if (!empty($needed_privileges[$privilege->privilegename]) |
|
67 | 67 | && $needed_privileges[$privilege->privilegename]['assignee'] == $privilege->assignee |
68 | 68 | && $needed_privileges[$privilege->privilegename]['value'] == $privilege->value) { |
69 | 69 | unset($needed_privileges[$privilege->privilegename]); |
70 | 70 | continue; |
71 | 71 | } |
72 | 72 | // Clear old ACLs applying to others than current user or selected owner group |
73 | - if ( $privilege->assignee != midcom::get()->auth->user->id |
|
73 | + if ($privilege->assignee != midcom::get()->auth->user->id |
|
74 | 74 | && $privilege->assignee != $owner_id) { |
75 | 75 | debug_add("Removing privilege {$privilege->privilegename} from {$privilege->assignee}"); |
76 | 76 | $object->unset_privilege($privilege->privilegename, $privilege->assignee); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | private function _render_line(array $link, &$other_obj) |
216 | 216 | { |
217 | 217 | $this->_request_data['link'] = $link; |
218 | - $this->_request_data['other_obj'] =& $other_obj; |
|
218 | + $this->_request_data['other_obj'] = & $other_obj; |
|
219 | 219 | |
220 | 220 | $ref = midcom_helper_reflector::get($link['class']); |
221 | 221 | |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | { |
409 | 409 | echo "<ul class=\"relatedto_toolbar\" data-link-guid=\"{$link['guid']}\" data-other-guid=\"{$other_obj->guid}\">\n"; |
410 | 410 | |
411 | - if ( $link['component'] == 'net.nemein.wiki' |
|
411 | + if ($link['component'] == 'net.nemein.wiki' |
|
412 | 412 | || $link['component'] == 'org.openpsa.calendar') { |
413 | 413 | echo "<li><input type=\"button\" class=\"button info\" value=\"" . midcom::get()->i18n->get_string('details', 'org.openpsa.relatedto') . "\" /></li>\n"; |
414 | 414 | } |
@@ -134,7 +134,8 @@ discard block |
||
134 | 134 | ]; |
135 | 135 | try { |
136 | 136 | $to_arr['other_obj'] = midcom::get()->dbfactory->get_object_by_guid($mc->get_subkey($guid, $object_prefix . 'Guid')); |
137 | - } catch (midcom_error $e) { |
|
137 | + } |
|
138 | + catch (midcom_error $e) { |
|
138 | 139 | continue; |
139 | 140 | } |
140 | 141 | |
@@ -438,7 +439,8 @@ discard block |
||
438 | 439 | if (!($this->_object instanceof org_openpsa_relatedto_dba)) { |
439 | 440 | $response->status = "method requires guid of a link object as an argument"; |
440 | 441 | } |
441 | - } catch (midcom_error $e) { |
|
442 | + } |
|
443 | + catch (midcom_error $e) { |
|
442 | 444 | $response->status = "error: " . $e->getMessage(); |
443 | 445 | } |
444 | 446 | |
@@ -464,7 +466,8 @@ discard block |
||
464 | 466 | $relation = new org_openpsa_relatedto_dba($guid); |
465 | 467 | $response->result = $relation->delete(); |
466 | 468 | $response->status = 'Last message: ' . midcom_connection::get_error_string(); |
467 | - } catch (midcom_error $e) { |
|
469 | + } |
|
470 | + catch (midcom_error $e) { |
|
468 | 471 | $response->result = false; |
469 | 472 | $response->status = "Object '{$guid}' could not be loaded, error:" . $e->getMessage(); |
470 | 473 | } |
@@ -101,7 +101,7 @@ |
||
101 | 101 | |
102 | 102 | $this->_controller = $this->load_controller(); |
103 | 103 | |
104 | - if ( $data['enable_versioning'] |
|
104 | + if ($data['enable_versioning'] |
|
105 | 105 | && $request->request->count() > 0) { |
106 | 106 | $this->_backup_attachment(); |
107 | 107 | } |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | $results_var = $this->_prefix . 'results'; |
64 | 64 | if (!empty($_REQUEST[$page_var])) { |
65 | 65 | debug_add("{$page_var} has value: {$_REQUEST[$page_var]}"); |
66 | - $this->_current_page = (int)$_REQUEST[$page_var]; |
|
66 | + $this->_current_page = (int) $_REQUEST[$page_var]; |
|
67 | 67 | } |
68 | 68 | if (!empty($_REQUEST[$results_var])) { |
69 | 69 | debug_add("{$results_var} has value: {$_REQUEST[$results_var]}"); |
70 | - $this->results_per_page = (int)$_REQUEST[$results_var]; |
|
70 | + $this->results_per_page = (int) $_REQUEST[$results_var]; |
|
71 | 71 | } |
72 | - $this->_offset = ($this->_current_page-1)*$this->results_per_page; |
|
72 | + $this->_offset = ($this->_current_page - 1) * $this->results_per_page; |
|
73 | 73 | if ($this->_offset < 0) { |
74 | 74 | $this->_offset = 0; |
75 | 75 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | return $this->_midcom_qb->add_constraint($param, $op, $val); |
292 | 292 | } |
293 | 293 | |
294 | - public function add_order($param, $sort='ASC') |
|
294 | + public function add_order($param, $sort = 'ASC') |
|
295 | 295 | { |
296 | 296 | if (!$this->_sanity_check()) { |
297 | 297 | return false; |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | if (!$this->_sanity_check()) { |
329 | 329 | return false; |
330 | 330 | } |
331 | - if ( !$this->count |
|
331 | + if (!$this->count |
|
332 | 332 | || $this->_count_mode != 'count') { |
333 | 333 | $this->count = $this->_midcom_qb_count->count(); |
334 | 334 | } |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | if (!$this->_sanity_check()) { |
342 | 342 | return false; |
343 | 343 | } |
344 | - if ( !$this->count |
|
344 | + if (!$this->count |
|
345 | 345 | || $this->_count_mode != 'count_unchecked') { |
346 | 346 | $this->count = $this->_midcom_qb_count->count_unchecked(); |
347 | 347 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $data['query'] = new org_openpsa_reports_query_dba($args[0]); |
89 | 89 | $data['query']->require_do('midgard:update'); |
90 | 90 | } else { |
91 | - $data['query']= new org_openpsa_reports_query_dba(); |
|
91 | + $data['query'] = new org_openpsa_reports_query_dba(); |
|
92 | 92 | $data['query']->component = $this->_component; |
93 | 93 | } |
94 | 94 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | protected function _generator_load_redirect(&$args) |
118 | 118 | { |
119 | - $this->_request_data['query'] = new org_openpsa_reports_query_dba($args[0]);; |
|
119 | + $this->_request_data['query'] = new org_openpsa_reports_query_dba($args[0]); ; |
|
120 | 120 | |
121 | 121 | if (empty($args[1])) { |
122 | 122 | debug_add('Filename part not specified in URL, generating'); |
@@ -104,7 +104,7 @@ |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | $help = new midcom_admin_help_help(); |
107 | - $this->_request_data['help'] = $help->get_help_contents('asgard_'.$this->type, $help_component); |
|
107 | + $this->_request_data['help'] = $help->get_help_contents('asgard_' . $this->type, $help_component); |
|
108 | 108 | $this->_request_data['component'] = $component; |
109 | 109 | } |
110 | 110 |
@@ -281,7 +281,7 @@ |
||
281 | 281 | return $data; |
282 | 282 | } |
283 | 283 | |
284 | - $preg='/s:([0-9]+):"(.*?)";/ms'; |
|
284 | + $preg = '/s:([0-9]+):"(.*?)";/ms'; |
|
285 | 285 | preg_match_all($preg, $data, $matches); |
286 | 286 | $cache = []; |
287 | 287 |