@@ -115,11 +115,11 @@ discard block |
||
| 115 | 115 | $fields[$key] = $this->_detect_schema($key, $value); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - if ( !isset($this->_request_data['config']->_local[$key]) |
|
| 118 | + if (!isset($this->_request_data['config']->_local[$key]) |
|
| 119 | 119 | || $this->_request_data['config']->_local[$key] == $this->_request_data['config']->_global[$key]) { |
| 120 | 120 | // No local configuration setting, note to user that this is the global value |
| 121 | 121 | $fields[$key]['title'] = $schema->get_l10n()->get($fields[$key]['title']); |
| 122 | - $fields[$key]['title'] .= " <span class=\"global\">(" . $this->_l10n->get('global value') .")</span>"; |
|
| 122 | + $fields[$key]['title'] .= " <span class=\"global\">(" . $this->_l10n->get('global value') . ")</span>"; |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | private function _save_topic(midcom_db_topic $topic, $config) |
| 288 | 288 | { |
| 289 | 289 | foreach ($this->_request_data['config']->_global as $global_key => $global_value) { |
| 290 | - if ( isset($config[$global_key]) |
|
| 290 | + if (isset($config[$global_key]) |
|
| 291 | 291 | && $config[$global_key] != $global_value) { |
| 292 | 292 | continue; |
| 293 | 293 | // Skip the ones we will set next |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | foreach ($config as $key => $value) { |
| 303 | - if ( is_array($value) |
|
| 303 | + if (is_array($value) |
|
| 304 | 304 | || is_object($value)) { |
| 305 | 305 | /** |
| 306 | 306 | * See http://trac.midgard-project.org/ticket/1442 |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | public function form_widget_simple(FormView $view, array $data) |
| 19 | 19 | { |
| 20 | - if ( !empty($data['value']) |
|
| 20 | + if (!empty($data['value']) |
|
| 21 | 21 | || is_numeric($data['value'])) { |
| 22 | 22 | return $data['value']; |
| 23 | 23 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | case 'save': |
| 45 | 45 | $this->_reset_password($data['controller']->get_form_values()); |
| 46 | 46 | $data['processing_msg'] = $this->_l10n->get('password reset, mail sent.'); |
| 47 | - $data['processing_msg_raw']= 'password reset, mail sent.'; |
|
| 47 | + $data['processing_msg_raw'] = 'password reset, mail sent.'; |
|
| 48 | 48 | $this->_success = true; |
| 49 | 49 | break; |
| 50 | 50 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | private function load_datamanager() |
| 31 | 31 | { |
| 32 | 32 | $dm = datamanager::from_schemadb($this->_config->get('schemadb_group')); |
| 33 | - $persons =& $dm->get_schema('default')->get_field('persons'); |
|
| 33 | + $persons = & $dm->get_schema('default')->get_field('persons'); |
|
| 34 | 34 | $persons['hidden'] = true; |
| 35 | 35 | return $dm->set_storage($this->_group); |
| 36 | 36 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | |
| 54 | 54 | foreach ($schemadb->all() as $schema) { |
| 55 | 55 | if ($schema->has_field('name')) { |
| 56 | - $field =& $schema->get_field('name'); |
|
| 56 | + $field = & $schema->get_field('name'); |
|
| 57 | 57 | $field['required'] = ($this->_handler_id === 'edit'); |
| 58 | 58 | } |
| 59 | 59 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | ]); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if ( $this->_article->topic === $this->_topic->id |
|
| 47 | + if ($this->_article->topic === $this->_topic->id |
|
| 48 | 48 | && $this->_article->can_do('midgard:delete')) { |
| 49 | 49 | $delete = $this->get_workflow('delete', ['object' => $this->_article]); |
| 50 | 50 | $buttons[] = $delete->get_button("delete/{$this->_article->guid}/"); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | if ($this->_config->get('comments_enable')) { |
| 97 | 97 | if ($comments_node = $this->_seek_comments()) { |
| 98 | 98 | $this->_request_data['comments_url'] = $comments_node[MIDCOM_NAV_RELATIVEURL] . "comment/{$this->_article->guid}"; |
| 99 | - if ( $this->_topic->can_do('midgard:update') |
|
| 99 | + if ($this->_topic->can_do('midgard:update') |
|
| 100 | 100 | && $this->_topic->can_do('net.nehmer.comments:moderation')) { |
| 101 | 101 | net_nehmer_comments_viewer::add_head_elements(); |
| 102 | 102 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ]); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - if ( $this->_article->topic === $this->_topic->id |
|
| 49 | + if ($this->_article->topic === $this->_topic->id |
|
| 50 | 50 | && $this->_article->can_do('midgard:delete')) { |
| 51 | 51 | $delete = $this->get_workflow('delete', ['object' => $this->_article]); |
| 52 | 52 | $buttons[] = $delete->get_button("delete/{$this->_article->guid}/"); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $this->_datamanager->set_storage($this->_article); |
| 115 | 115 | |
| 116 | 116 | $arg = $this->_article->name ?: $this->_article->guid; |
| 117 | - if ( $arg != 'index' |
|
| 117 | + if ($arg != 'index' |
|
| 118 | 118 | && $this->_config->get('hide_navigation')) { |
| 119 | 119 | $this->add_breadcrumb("{$arg}/", $this->_article->title); |
| 120 | 120 | } |
@@ -124,13 +124,13 @@ discard block |
||
| 124 | 124 | midcom::get()->metadata->set_request_metadata($this->_article->metadata->revised, $this->_article->guid); |
| 125 | 125 | $this->bind_view_to_object($this->_article, $this->_datamanager->get_schema()->get_name()); |
| 126 | 126 | |
| 127 | - if ( $this->_config->get('indexinnav') |
|
| 127 | + if ($this->_config->get('indexinnav') |
|
| 128 | 128 | || $this->_config->get('autoindex') |
| 129 | 129 | || $this->_article->name != 'index') { |
| 130 | 130 | $this->set_active_leaf($this->_article->id); |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - if ( $this->_config->get('folder_in_title') |
|
| 133 | + if ($this->_config->get('folder_in_title') |
|
| 134 | 134 | && $this->_topic->extra != $this->_article->title) { |
| 135 | 135 | midcom::get()->head->set_pagetitle("{$this->_topic->extra}: {$this->_article->title}"); |
| 136 | 136 | } else { |
@@ -28,10 +28,10 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | private function load_controller() |
| 30 | 30 | { |
| 31 | - if ( $this->_config->get('simple_name_handling') |
|
| 31 | + if ($this->_config->get('simple_name_handling') |
|
| 32 | 32 | && !midcom::get()->auth->admin) { |
| 33 | 33 | foreach ($this->_request_data['schemadb']->all() as $schema) { |
| 34 | - $field =& $schema->get_field('name'); |
|
| 34 | + $field = & $schema->get_field('name'); |
|
| 35 | 35 | $field['readonly'] = true; |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | private function load_controller($schemaname, array $defaults) |
| 33 | 33 | { |
| 34 | 34 | if ($this->_config->get('simple_name_handling')) { |
| 35 | - $field =& $this->_request_data['schemadb']->get($schemaname)->get_field('name'); |
|
| 35 | + $field = & $this->_request_data['schemadb']->get($schemaname)->get_field('name'); |
|
| 36 | 36 | $field['hidden'] = true; |
| 37 | 37 | } |
| 38 | 38 | $dm = new datamanager($this->_request_data['schemadb']); |