@@ -109,8 +109,8 @@ |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | $help = new midcom_admin_help_help(); |
112 | - $this->_request_data['help'] = $help->get_help_contents('asgard_'.$this->type, $help_component); |
|
113 | - $this->_request_data['component'] = $component; |
|
112 | + $this->_request_data['help'] = $help->get_help_contents('asgard_' . $this->type, $help_component); |
|
113 | + $this->_request_data['component'] = $component; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | /** |
@@ -96,7 +96,7 @@ |
||
96 | 96 | $data['reflector'] = midcom_helper_reflector::get($data['type']); |
97 | 97 | $data['label_property'] = $data['reflector']->get_label_property(); |
98 | 98 | |
99 | - if ( isset($_POST['undelete']) |
|
99 | + if (isset($_POST['undelete']) |
|
100 | 100 | && is_array($_POST['undelete'])) { |
101 | 101 | if (isset($_POST['purge'])) { |
102 | 102 | $this->_purge(); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | // List installed MgdSchema types and convert to DBA classes |
22 | 22 | foreach ($this->_request_data['schema_types'] as $schema_type) { |
23 | - if ( !is_null($type) |
|
23 | + if (!is_null($type) |
|
24 | 24 | && $schema_type != $type) { |
25 | 25 | // Skip |
26 | 26 | continue; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $qb->add_constraint('metadata.revised', '>=', $since); |
50 | 50 | } |
51 | 51 | |
52 | - if ( $only_mine |
|
52 | + if ($only_mine |
|
53 | 53 | && midcom::get()->auth->user) { |
54 | 54 | $qb->add_constraint('metadata.authors', 'LIKE', '|' . midcom::get()->auth->user->guid . '|'); |
55 | 55 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | $data['view_title'] = $this->_l10n->get('asgard'); |
95 | 95 | |
96 | - if ( isset($_POST['execute_mass_action']) |
|
96 | + if (isset($_POST['execute_mass_action']) |
|
97 | 97 | && !empty($_POST['selections']) |
98 | 98 | && isset($_POST['mass_action'])) { |
99 | 99 | $method_name = "_mass_{$_POST['mass_action']}"; |
@@ -108,14 +108,14 @@ discard block |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | $data['review_by'] = null; |
111 | - if ( $this->_config->get('enable_review_dates') |
|
111 | + if ($this->_config->get('enable_review_dates') |
|
112 | 112 | && isset($_REQUEST['review_by']) |
113 | 113 | && $_REQUEST['review_by'] != 'any') { |
114 | 114 | $data['review_by'] = (int) $_REQUEST['review_by']; |
115 | 115 | } |
116 | 116 | |
117 | 117 | $data['type_filter'] = null; |
118 | - if ( isset($_REQUEST['type_filter']) |
|
118 | + if (isset($_REQUEST['type_filter']) |
|
119 | 119 | && $_REQUEST['type_filter'] != 'any') { |
120 | 120 | $data['type_filter'] = $_REQUEST['type_filter']; |
121 | 121 | } |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | continue; |
275 | 275 | } |
276 | 276 | |
277 | - if ( $object->can_do('midgard:update') |
|
277 | + if ($object->can_do('midgard:update') |
|
278 | 278 | && $object->can_do('midcom:approve')) { |
279 | 279 | $object->metadata->approve(); |
280 | 280 | midcom::get()->uimessages->add($this->_l10n->get('midgard.admin.asgard'), sprintf($this->_l10n->get('object %s approved'), $object->guid)); |
@@ -100,7 +100,7 @@ |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | if (!empty($this->config['widget_config']['sortable'])) { |
103 | - uasort($this->map, function ($a, $b) { |
|
103 | + uasort($this->map, function($a, $b) { |
|
104 | 104 | if ($a->metadata->score == $b->metadata->score) { |
105 | 105 | return strnatcasecmp($a->name, $b->name); |
106 | 106 | } |
@@ -99,7 +99,7 @@ |
||
99 | 99 | $qb = midcom::get()->dbfactory->new_query_builder($this->config['type_config']['mapping_class_name']); |
100 | 100 | $qb->add_constraint($this->config['type_config']['master_fieldname'], '=', $this->get_master_foreign_key()); |
101 | 101 | |
102 | - if ( $this->config['type_config']['sortable'] |
|
102 | + if ($this->config['type_config']['sortable'] |
|
103 | 103 | && preg_match('/^(ASC|DESC)/i', $this->config['type_config']['sortable_sort_order'], $regs)) { |
104 | 104 | $order = strtoupper($regs[1]); |
105 | 105 | $qb->add_order('metadata.score', $order); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $this->content .= "{$this->abstract}\n"; |
138 | 138 | } |
139 | 139 | |
140 | - if (! $this->title) { |
|
140 | + if (!$this->title) { |
|
141 | 141 | $this->title = $this->document_url; |
142 | 142 | } |
143 | 143 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | if (!empty($field->vars['value'])) { |
179 | 179 | //only index the first attachment for now |
180 | 180 | $attachment = array_shift($field->vars['value']); |
181 | - if ( !$attachment instanceof \midcom_db_attachment |
|
181 | + if (!$attachment instanceof \midcom_db_attachment |
|
182 | 182 | && !empty($attachment['object'])) { |
183 | 183 | //This is the form edit case |
184 | 184 | //@todo: In create case, nothing is found currently |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | */ |
263 | 263 | private function resolve_auto_method($name) |
264 | 264 | { |
265 | - if ( $name == 'abstract' |
|
265 | + if ($name == 'abstract' |
|
266 | 266 | || $name == 'title' |
267 | 267 | || $name == 'author') { |
268 | 268 | return $name; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | $qb = org_openpsa_directmarketing_campaign_messagereceipt_dba::new_query_builder(); |
86 | 86 | $qb->add_constraint('token', '=', $token); |
87 | 87 | $qb->add_constraint('orgOpenpsaObtype', '=', $type); |
88 | - $ret = $qb->execute(); |
|
88 | + $ret = $qb->execute(); |
|
89 | 89 | debug_print_r("_qb_token_receipts({$token}) returned", $ret); |
90 | 90 | if (empty($ret)) { |
91 | 91 | midcom::get()->auth->drop_sudo(); |
@@ -143,7 +143,7 @@ |
||
143 | 143 | |
144 | 144 | $this->_modules[$name] = new $classname(); |
145 | 145 | $this->_modules[$name]->initialize(); |
146 | - $this->$name =& $this->_modules[$name]; |
|
146 | + $this->$name = & $this->_modules[$name]; |
|
147 | 147 | array_unshift($this->_unload_queue, $name); |
148 | 148 | } |
149 | 149 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | midcom::get()->auth->require_valid_user(); |
37 | 37 | midcom::get()->skip_page_style = true; |
38 | 38 | |
39 | - $this->add_stylesheet(MIDCOM_STATIC_URL ."/midcom.helper.imagepopup/styling.css", 'screen'); |
|
39 | + $this->add_stylesheet(MIDCOM_STATIC_URL . "/midcom.helper.imagepopup/styling.css", 'screen'); |
|
40 | 40 | |
41 | 41 | $data['filetype'] = $args[0]; |
42 | 42 | $data['object'] = null; |