Completed
Push — develop ( da46c8...85331c )
by Daniel
07:12
created
services/topic.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
 	{
251 251
 		if ($topic_data['topic_first_post_id'] === $post_data['post_id'])
252 252
 		{
253
-			return append_sid($topic_data['topic_url'], 'view=unread') . '#unread';
253
+			return append_sid($topic_data['topic_url'], 'view=unread').'#unread';
254 254
 		}
255 255
 
256
-		return append_sid($topic_data['topic_url'], 'p=' . $post_data['post_id']) . '#p' . $post_data['post_id'];
256
+		return append_sid($topic_data['topic_url'], 'p='.$post_data['post_id']).'#p'.$post_data['post_id'];
257 257
 	}
258 258
 
259 259
 	/**
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 		$l_edited_by = $edit_reason = '';
267 267
 		if (($row['post_edit_count'] && $this->config['display_last_edited']) || $row['post_edit_reason'])
268 268
 		{
269
-			$display_username	= $users_cache[$row['poster_id']]['username_full'];
269
+			$display_username = $users_cache[$row['poster_id']]['username_full'];
270 270
 			$l_edited_by = $this->language->lang('EDITED_TIMES_TOTAL', (int) $row['post_edit_count'], $display_username, $this->user->format_date($row['post_edit_time'], false, true));
271 271
 			$edit_reason = $row['post_edit_reason'];
272 272
 		}
@@ -289,8 +289,8 @@  discard block
 block discarded – undo
289 289
 
290 290
 		if ($s_post_deleted && $row['post_delete_user'])
291 291
 		{
292
-			$display_postername	= $users_cache[$row['poster_id']]['username_full'];
293
-			$display_username	= $users_cache[$row['post_delete_user']]['username_full'];
292
+			$display_postername = $users_cache[$row['poster_id']]['username_full'];
293
+			$display_username = $users_cache[$row['post_delete_user']]['username_full'];
294 294
 
295 295
 			$l_deleted_message = $this->get_delete_message($row, $display_postername, $display_username);
296 296
 			$l_deleted_by = $this->language->lang('DELETED_INFORMATION', $display_username, $this->user->format_date($row['post_delete_time'], false, true));
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 		);
367 367
 
368 368
 		return array(
369
-			'U_BOOKMARK_TOPIC'		=> ($this->user->data['is_registered'] && $this->config['allow_bookmarks']) ? $this->helper->get_viewtopic_url($topic_data) . '&bookmark=1&hash=' . generate_link_hash("topic_{$topic_data['topic_id']}") : '',
369
+			'U_BOOKMARK_TOPIC'		=> ($this->user->data['is_registered'] && $this->config['allow_bookmarks']) ? $this->helper->get_viewtopic_url($topic_data).'&bookmark=1&hash='.generate_link_hash("topic_{$topic_data['topic_id']}") : '',
370 370
 			'S_BOOKMARK_TOPIC'		=> $this->language->lang($lang_keys['bookmark'][$state_key]),
371 371
 			'S_BOOKMARK_TOGGLE'		=> $this->language->lang($lang_keys['toggle'][$state_key]),
372 372
 			'S_BOOKMARKED_TOPIC'	=> $bookmarked,
Please login to merge, or discard this patch.
services/fields.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
 		$this->display_mode = $view_mode;
98 98
 		$this->content_type = $entity->get_content_name();
99
-		$this->tpl_name	= ($custom_tpl) ? $this->content_type . '_' . $view_mode : '';
99
+		$this->tpl_name = ($custom_tpl) ? $this->content_type.'_'.$view_mode : '';
100 100
 		$this->view_mode = (in_array($view_mode, array('summary', 'detail'))) ? $view_mode : 'summary';
101 101
 		$this->form_fields = array_intersect_key($this->fields_factory->get_all(), array_flip($view_mode_fields));
102 102
 		$this->db_fields = $db_fields;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	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 = '')
119 119
 	{
120
-		$callable = 'get_' . $this->view_mode . '_template_data';
120
+		$callable = 'get_'.$this->view_mode.'_template_data';
121 121
 		$tpl_data = array_merge(array(
122 122
 				'TOPIC_COMMENTS'	=> $this->comments->count($topic_data),
123 123
 				'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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,8 +142,7 @@
 block discarded – undo
142 142
 			$this->template->assign_vars(array_change_key_case(array_merge($tpl_data, $fields_data['all']), CASE_UPPER));
143 143
 			$this->template->set_filenames(array('content' => $this->tpl_name));
144 144
 			$tpl_data['CUSTOM_DISPLAY'] = $this->template->assign_display('content');
145
-		}
146
-		else
145
+		} else
147 146
 		{
148 147
 			$tpl_data['FIELDS'] = $fields_data;
149 148
 		}
Please login to merge, or discard this patch.