Completed
Push — develop ( 0adf6c...3ff49e )
by Daniel
07:14
created
services/fields.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 		$this->display_mode = $view_mode;
99 99
 		$this->content_type = $entity->get_content_name();
100
-		$this->tpl_name	= ($custom_tpl) ? $tpl_name ?: $this->content_type . '_' . $view_mode : '';
100
+		$this->tpl_name = ($custom_tpl) ? $tpl_name ?: $this->content_type.'_'.$view_mode : '';
101 101
 		$this->view_mode = (in_array($view_mode, array('summary', 'detail'))) ? $view_mode : 'summary';
102 102
 		$this->form_fields = array_intersect_key($this->fields_factory->get_all(), array_flip($view_mode_fields));
103 103
 		$this->db_fields = $db_fields;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public function show($type, array $topic_data, array $post_data, array $users_cache, array &$attachments, array &$update_count, array $topic_tracking_info, array $topic_data_overwrite = array(), $mode = '')
120 120
 	{
121
-		$callable = 'get_' . $this->view_mode . '_template_data';
121
+		$callable = 'get_'.$this->view_mode.'_template_data';
122 122
 		$tpl_data = array_merge(array(
123 123
 				'TOPIC_COMMENTS'	=> $this->comments->count($topic_data),
124 124
 				'S_USER_LOGGED_IN'	=> $this->user->data['is_registered'],
@@ -185,21 +185,21 @@  discard block
 block discarded – undo
185 185
 			$field_data['field_props'] = array_replace_recursive($this->form_fields[$field_type]->get_default_props(), $field_data['field_props']);
186 186
 			$field_data['field_value'] = &$field_values[$field_name];
187 187
 
188
-			$field_contents	= $this->form_fields[$field_type]->display_field($field_data, $this->display_mode, $tpl_data, $this->content_type);
188
+			$field_contents = $this->form_fields[$field_type]->display_field($field_data, $this->display_mode, $tpl_data, $this->content_type);
189 189
 
190 190
 			// this essentially hides other fields if the field returns an array
191 191
 			if (is_array($field_contents))
192 192
 			{
193 193
 				$display_data['all'] = $field_contents;
194
-				$display_data[$field_data['field_' . $this->view_mode . '_show']] = $field_contents;
194
+				$display_data[$field_data['field_'.$this->view_mode.'_show']] = $field_contents;
195 195
 				break;
196 196
 			}
197 197
 
198 198
 			if (!empty($field_contents))
199 199
 			{
200
-				$field = '<div class="field-label ' . $this->label[$field_data['field_' . $this->view_mode . '_ldisp']] . '">' . $field_data['field_label'] . $this->language->lang('COLON') . ' </div>' . $field_contents;
200
+				$field = '<div class="field-label '.$this->label[$field_data['field_'.$this->view_mode.'_ldisp']].'">'.$field_data['field_label'].$this->language->lang('COLON').' </div>'.$field_contents;
201 201
 				$display_data['all'][$field_name] = $field;
202
-				$display_data[$field_data['field_' . $this->view_mode . '_show']][$field_name] = $field;
202
+				$display_data[$field_data['field_'.$this->view_mode.'_show']][$field_name] = $field;
203 203
 			}
204 204
 		}
205 205
 
Please login to merge, or discard this patch.
blocks/recent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -163,13 +163,13 @@  discard block
 block discarded – undo
163 163
 			$topic_tracking_info = $this->forum->get_topic_tracking_info($forum_id);
164 164
 			$block_fields = $this->get_block_fields($entity->get_field_types());
165 165
 
166
-			$this->fields->prepare_to_show($entity, array_keys($topics_data), $block_fields, $this->settings['block_tpl'], 'block', $block_id . '_block');
166
+			$this->fields->prepare_to_show($entity, array_keys($topics_data), $block_fields, $this->settings['block_tpl'], 'block', $block_id.'_block');
167 167
 
168 168
 			$update_count = array();
169 169
 			foreach ($posts_data as $topic_id => $posts)
170 170
 			{
171
-				$post_data	= array_shift($posts);
172
-				$topic_data	= $topics_data[$topic_id];
171
+				$post_data = array_shift($posts);
172
+				$topic_data = $topics_data[$topic_id];
173 173
 				$this->ptemplate->assign_block_vars('topicrow', $this->fields->show($type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info));
174 174
 			}
175 175
 			unset($topics_data, $posts_data, $users_cache, $attachments, $topic_tracking_info);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 			POST_STICKY		=> 'CONTENT_STICKY_POSTS',
197 197
 		);
198 198
 
199
-		return (isset($topic_types[$this->settings['topic_type']])) ? $topic_types[$this->settings['topic_types']] :  $this->language->lang('CONTENT_' . $this->sort_options[$this->settings['sort_key']], $content_langname);
199
+		return (isset($topic_types[$this->settings['topic_type']])) ? $topic_types[$this->settings['topic_types']] : $this->language->lang('CONTENT_'.$this->sort_options[$this->settings['sort_key']], $content_langname);
200 200
 	}
201 201
 
202 202
 	/**
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 		foreach ($content_types as $value => $title)
264 264
 		{
265 265
 			$selected = ($type == $value) ? ' selected="selected"' : '';
266
-			$html .= '<option value="' . $value . '"' . $selected . ' data-toggle-setting="#fields-col-' . $value . '">' . $title . '</option>';
266
+			$html .= '<option value="'.$value.'"'.$selected.' data-toggle-setting="#fields-col-'.$value.'">'.$title.'</option>';
267 267
 		}
268 268
 
269 269
 		return $html;
Please login to merge, or discard this patch.