Completed
Push — develop ( 843010...da46c8 )
by Daniel
07:37
created
services/actions/type/edit.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	 * @param \blitze\content\services\views\views_factory		$views_factory			Views factory object
31 31
 	 * @param \blitze\content\services\types					$content_types			Content types object
32 32
 	 * @param \blitze\content\model\mapper_factory				$mapper_factory			Mapper factory object
33
-	*/
33
+	 */
34 34
 	public function __construct(\phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \blitze\sitemaker\services\auto_lang $auto_lang, \blitze\content\services\form\fields_factory $fields_factory, \blitze\content\services\views\views_factory $views_factory, \blitze\content\services\types $content_types, \blitze\content\model\mapper_factory $mapper_factory)
35 35
 	{
36 36
 		parent::__construct($auth, $controller_helper, $phpbb_dispatcher, $language, $template, $user, $auto_lang, $fields_factory, $views_factory);
Please login to merge, or discard this patch.
services/fields.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
 		$this->display_mode = $view_mode;
95 95
 		$this->content_type = $entity->get_content_name();
96
-		$this->tpl_name	= ($custom_tpl) ? $this->content_type . '_' . $view_mode : '';
96
+		$this->tpl_name = ($custom_tpl) ? $this->content_type.'_'.$view_mode : '';
97 97
 		$this->view_mode = (in_array($view_mode, array('summary', 'detail'))) ? $view_mode : 'summary';
98 98
 		$this->form_fields = array_intersect_key($this->fields_factory->get_all(), array_flip($view_mode_fields));
99 99
 		$this->db_fields = $db_fields;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	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 = '')
116 116
 	{
117
-		$callable = 'get_' . $this->view_mode . '_template_data';
117
+		$callable = 'get_'.$this->view_mode.'_template_data';
118 118
 		$tpl_data = array_merge(array(
119 119
 				'TOPIC_COMMENTS'	=> $this->comments->count($topic_data),
120 120
 				'S_USER_LOGGED_IN'	=> $this->user->data['is_registered'],
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 			$field_data['field_props'] = array_replace_recursive($this->form_fields[$field_type]->get_default_props(), $field_data['field_props']);
182 182
 			$field_data['field_value'] = &$field_values[$field_name];
183 183
 
184
-			$field_contents	= $this->form_fields[$field_type]->display_field($field_data, $this->display_mode, $tpl_data, $this->content_type);
184
+			$field_contents = $this->form_fields[$field_type]->display_field($field_data, $this->display_mode, $tpl_data, $this->content_type);
185 185
 
186 186
 			// this essentially hides other fields if the field returns an array
187 187
 			if (is_array($field_contents))
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
 			if (!empty($field_contents))
194 194
 			{
195
-				$display_data[$field_name] = '<div class="field-label ' . $this->label[$field_data['field_' . $this->view_mode . '_ldisp']] . '">' . $field_data['field_label'] . $this->language->lang('COLON') . ' </div>' . $field_contents;
195
+				$display_data[$field_name] = '<div class="field-label '.$this->label[$field_data['field_'.$this->view_mode.'_ldisp']].'">'.$field_data['field_label'].$this->language->lang('COLON').' </div>'.$field_contents;
196 196
 			}
197 197
 		}
198 198
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,8 +139,7 @@
 block discarded – undo
139 139
 			$this->template->assign_vars(array_change_key_case(array_merge($tpl_data, $fields_data), CASE_UPPER));
140 140
 			$this->template->set_filenames(array('content' => $this->tpl_name));
141 141
 			$tpl_data['CUSTOM_DISPLAY'] = $this->template->assign_display('content');
142
-		}
143
-		else
142
+		} else
144 143
 		{
145 144
 			$tpl_data['SEQ_DISPLAY'] = join("\n", $fields_data);
146 145
 		}
Please login to merge, or discard this patch.
services/topic.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -301,8 +301,7 @@
 block discarded – undo
301 301
 		if ($row['post_delete_reason'])
302 302
 		{
303 303
 			return $this->language->lang('POST_DELETED_BY_REASON', $display_postername, $display_username, $this->user->format_date($row['post_delete_time'], false, true), $row['post_delete_reason']);
304
-		}
305
-		else
304
+		} else
306 305
 		{
307 306
 			return $this->language->lang('POST_DELETED_BY', $display_postername, $display_username, $this->user->format_date($row['post_delete_time'], false, true));
308 307
 		}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	/**
245 245
 	 * @param array $topic_data
246 246
 	 * @param array $post_data
247
-	 * @return array
247
+	 * @return string
248 248
 	 */
249 249
 	protected function get_mini_post_url(array $topic_data, array $post_data)
250 250
 	{
@@ -324,7 +324,6 @@  discard block
 block discarded – undo
324 324
 	}
325 325
 
326 326
 	/**
327
-	 * @param array $row
328 327
 	 * @return array
329 328
 	 */
330 329
 	protected function get_watch_status_data(array $topic_data)
Please login to merge, or discard this 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_poster, $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) . '&amp;bookmark=1&amp;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).'&amp;bookmark=1&amp;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.
controller/main_controller.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	 * @param \blitze\content\services\poll							$poll				Poll object
51 51
 	 * @param \blitze\content\services\types						$content_types		Content types object
52 52
 	 * @param \blitze\content\services\views\views_factory			$views_factory		Views handlers
53
-	*/
53
+	 */
54 54
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\request\request_interface $request, \phpbb\template\template $template, \phpbb\user $user, \blitze\content\services\comments\comments_interface $comments, \blitze\content\services\poll $poll, \blitze\content\services\types $content_types, \blitze\content\services\views\views_factory $views_factory)
55 55
 	{
56 56
 		$this->db = $db;
Please login to merge, or discard this patch.
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,6 @@
 block discarded – undo
106 106
 	 *
107 107
 	 * @param string $type
108 108
 	 * @param int $topic_id
109
-	 * @param int $page
110 109
 	 * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
111 110
 	 */
112 111
 	public function show($type, $topic_id)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 		else
137 137
 		{
138 138
 			$template_file = 'views/print.html';
139
-			$this->template->assign_var('TOPIC_URL', generate_board_url(true) . $topic_data['topic_url']);
139
+			$this->template->assign_var('TOPIC_URL', generate_board_url(true).$topic_data['topic_url']);
140 140
 		}
141 141
 
142 142
 		return $this->helper->render($template_file, $topic_data['topic_title']);
@@ -184,15 +184,15 @@  discard block
 block discarded – undo
184 184
 	{
185 185
 		if (!$this->user->data['is_bot'] && !$this->request->is_set('page'))
186 186
 		{
187
-			$sql = 'UPDATE ' . TOPICS_TABLE . '
188
-				SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . "
187
+			$sql = 'UPDATE '.TOPICS_TABLE.'
188
+				SET topic_views = topic_views + 1, topic_last_view_time = ' . time()."
189 189
 				WHERE topic_id = $topic_id";
190 190
 			$this->db->sql_query($sql);
191 191
 
192 192
 			// Update the attachment download counts
193 193
 			if (sizeof($update_count))
194 194
 			{
195
-				$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
195
+				$sql = 'UPDATE '.ATTACHMENTS_TABLE.'
196 196
 					SET download_count = download_count + 1
197 197
 					WHERE ' . $this->db->sql_in_set('attach_id', array_unique($update_count));
198 198
 				$this->db->sql_query($sql);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,8 +132,7 @@
 block discarded – undo
132 132
 		{
133 133
 			$this->update_views($topic_id, $update_count);
134 134
 			$template_file = $view_handler->get_detail_template();
135
-		}
136
-		else
135
+		} else
137 136
 		{
138 137
 			$template_file = 'views/print.html';
139 138
 			$this->template->assign_var('TOPIC_URL', generate_board_url(true) . $topic_data['topic_url']);
Please login to merge, or discard this patch.
event/mcp_topic.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	 * @param \blitze\content\services\fields		$fields				Content fields object
37 37
 	 * @param string								$phpbb_root_path	Path to the phpbb includes directory.
38 38
 	 * @param string								$php_ext			php file extension
39
-	*/
39
+	 */
40 40
 	public function __construct(\phpbb\db\driver\driver_interface $db, \blitze\content\services\types $content_types, \blitze\content\services\fields $fields, $phpbb_root_path, $php_ext)
41 41
 	{
42 42
 		$this->db = $db;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,9 +115,9 @@
 block discarded – undo
115 115
 		$forum_list = is_array($forum_list) ? $forum_list : array($forum_list);
116 116
 
117 117
 		$sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, t.topic_title AS post_subject, t.topic_time AS post_time, t.topic_poster AS poster_id, t.topic_first_post_id AS post_id, t.topic_attachment AS post_attachment, t.topic_first_poster_name AS username, t.topic_first_poster_colour AS user_colour
118
-			FROM ' . TOPICS_TABLE . ' t
119
-			WHERE ' . $this->db->sql_in_set('forum_id', $this->get_forum_list($forum_list)) . '
120
-				AND  ' . $this->db->sql_in_set('topic_visibility', $event['visibility_const']) . "
118
+			FROM ' . TOPICS_TABLE.' t
119
+			WHERE ' . $this->db->sql_in_set('forum_id', $this->get_forum_list($forum_list)).'
120
+				AND  ' . $this->db->sql_in_set('topic_visibility', $event['visibility_const'])."
121 121
 				AND topic_delete_user <> 0
122 122
 				{$event['limit_time_sql']}
123 123
 			ORDER BY {$event['sort_order_sql']}";
Please login to merge, or discard this patch.
event/search.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	 * @param \phpbb\db\driver\driver_interface		$db					Database object
29 29
 	 * @param \phpbb\controller\helper				$helper				Helper object
30 30
 	 * @param \blitze\content\services\types		$content_types		Content types object
31
-	*/
31
+	 */
32 32
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \blitze\content\services\types $content_types)
33 33
 	{
34 34
 		$this->db = $db;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	public function modify_posts_data(\phpbb\event\data $event)
59 59
 	{
60 60
 		$sql_array = $event['sql_array'];
61
-		$sql_array['WHERE'] .= ' AND t.topic_time <= ' . time();
61
+		$sql_array['WHERE'] .= ' AND t.topic_time <= '.time();
62 62
 
63 63
 		$sql_count = $sql_array;
64 64
 		$sql_count['SELECT'] = 'COUNT(p.post_id) AS total_results';
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 	public function modify_topic_data(\phpbb\event\data $event)
83 83
 	{
84 84
 		$sql_where = $event['sql_where'];
85
-		$sql_where .= ' AND t.topic_time <= ' . time();
85
+		$sql_where .= ' AND t.topic_time <= '.time();
86 86
 
87
-		$sql = 'SELECT COUNT(t.topic_id) AS total_results FROM ' . $event['sql_from'] . ' WHERE ' . $sql_where;
87
+		$sql = 'SELECT COUNT(t.topic_id) AS total_results FROM '.$event['sql_from'].' WHERE '.$sql_where;
88 88
 		$result = $this->db->sql_query($sql);
89 89
 		$total_results = $this->db->sql_fetchfield('total_results');
90 90
 		$this->db->sql_freeresult($result);
Please login to merge, or discard this patch.
event/listener.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	 * @param \phpbb\language\language				$language			Language object
29 29
 	 * @param \blitze\content\services\types		$content_types		Content types object
30 30
 	 * @param string								$php_ext			php file extension
31
-	*/
31
+	 */
32 32
 	public function __construct(\phpbb\language\language $language, \blitze\content\services\types $content_types, $php_ext)
33 33
 	{
34 34
 		$this->language = $language;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 	 */
79 79
 	public function add_viewonline_location(\phpbb\event\data $event)
80 80
 	{
81
-		if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/content/') === 0)
81
+		if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.'.$this->php_ext.'/content/') === 0)
82 82
 		{
83 83
 			$types = join('|', $this->content_types->get_forum_types());
84 84
 			preg_match("/\/content\/($types)(\/[0-9]\/.*)?/is", $event['row']['session_page'], $match);
Please login to merge, or discard this patch.
event/viewtopic.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	 *
25 25
 	 * @param \phpbb\controller\helper				$helper				Helper object
26 26
 	 * @param \blitze\content\services\types		$content_types		Content types object
27
-	*/
27
+	 */
28 28
 	public function __construct(\phpbb\controller\helper $helper, \blitze\content\services\types $content_types)
29 29
 	{
30 30
 		$this->helper = $helper;
Please login to merge, or discard this patch.
event/posting.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 	 * Constructor
30 30
 	 *
31 31
 	 * @param \blitze\content\services\form\builder		$builder		Form builder object
32
-	*/
32
+	 */
33 33
 	public function __construct(\blitze\content\services\form\builder $builder)
34 34
 	{
35 35
 		$this->builder = $builder;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -160,8 +160,7 @@
 block discarded – undo
160 160
 			if ($this->build_content)
161 161
 			{
162 162
 				$event['redirect_url'] = $this->builder->get_cp_url();
163
-			}
164
-			else
163
+			} else
165 164
 			{
166 165
 				$topic_url = $this->builder->get_post_url($this->content_type, $event['post_data']);
167 166
 
Please login to merge, or discard this patch.