Completed
Push — develop ( c77227...1859c0 )
by Daniel
14:00
created
services/actions/topic/index.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function execute($u_action, $mode = '')
92 92
 	{
93
-		include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext);
93
+		include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext);
94 94
 
95 95
 		$this->language->add_lang('viewforum');
96 96
 		$this->language->add_lang('manager', 'blitze/content');
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 			$filter_topic_status = $this->apply_status_filter($sql_where_array);
107 107
 			$filter_content_type = $this->apply_content_type_filter();
108 108
 
109
-			$callable = 'init_' . $mode . '_mode';
110
-			$this->base_url = $u_action . (sizeof($this->params) ? '&' : '');
109
+			$callable = 'init_'.$mode.'_mode';
110
+			$this->base_url = $u_action.(sizeof($this->params) ? '&' : '');
111 111
 			$this->$callable($content_types, $sql_where_array);
112 112
 
113 113
 			$this->forum->query(true, false)
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 		$topic_tracking_info = $this->forum->get_topic_tracking_info();
139 139
 
140 140
 		$topics_data = array_values($topics_data);
141
-		$base_url = $u_action . http_build_query($this->params);
141
+		$base_url = $u_action.http_build_query($this->params);
142 142
 
143 143
 		for ($i = 0, $size = sizeof($topics_data); $i < $size; $i++)
144 144
 		{
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	{
173 173
 		return array(
174 174
 			'ATTACH_ICON_IMG'	=> $this->get_attachment_icon($row),
175
-			'U_REVIEW_TOPIC'	=> $u_action . "&amp;do=view&amp;type=$content_type&amp;t=" . $row['topic_id'],
175
+			'U_REVIEW_TOPIC'	=> $u_action."&amp;do=view&amp;type=$content_type&amp;t=".$row['topic_id'],
176 176
 		);
177 177
 	}
178 178
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 			'S_CAN_MAKE_NORMAL'		=> ($s_can_make_sticky || $s_can_make_announce),
198 198
 			'S_CAN_MAKE_STICKY'		=> $s_can_make_sticky,
199 199
 			'S_CAN_MAKE_ANNOUNCE'	=> $s_can_make_announce,
200
-			'U_MCP_ACTION'			=> $this->base_url . '&amp;do=moderate&amp;redirect=' . $this->get_redirect_url($this->base_url),
200
+			'U_MCP_ACTION'			=> $this->base_url.'&amp;do=moderate&amp;redirect='.$this->get_redirect_url($this->base_url),
201 201
 		));
202 202
 	}
203 203
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	 */
208 208
 	protected function init_ucp_mode(array $content_types, array &$sql_where_array)
209 209
 	{
210
-		$sql_where_array[] =  't.topic_poster = ' . (int) $this->user->data['user_id'];
210
+		$sql_where_array[] = 't.topic_poster = '.(int) $this->user->data['user_id'];
211 211
 
212 212
 		// list all content types that the user can post in
213 213
 		$postable_forums = array_intersect_key($this->content_forums, $this->auth->acl_getf('f_post', true));
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 			$this->template->assign_block_vars('postable', array(
220 220
 				'TYPE'		=> $entity->get_content_langname(),
221 221
 				'COLOUR'	=> $entity->get_content_colour(),
222
-				'U_POST'	=> append_sid("{$this->phpbb_root_path}posting." . $this->php_ext, 'mode=post&amp;f=' . $entity->get_forum_id()),
222
+				'U_POST'	=> append_sid("{$this->phpbb_root_path}posting.".$this->php_ext, 'mode=post&amp;f='.$entity->get_forum_id()),
223 223
 			));
224 224
 		}
225 225
 	}
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 			'CONTENT_TYPE'			=> $entity->get_content_langname(),
238 238
 			'CONTENT_TYPE_COLOR'	=> $entity->get_content_colour(),
239 239
 			'S_COMMENTS'			=> $entity->get_allow_comments(),
240
-			'U_CONTENT_TYPE'		=> $base_url . "&amp;type=$type",
240
+			'U_CONTENT_TYPE'		=> $base_url."&amp;type=$type",
241 241
 		);
242 242
 	}
243 243
 
@@ -287,8 +287,8 @@  discard block
 block discarded – undo
287 287
 		}
288 288
 
289 289
 		return array(
290
-			'TOPIC_STATUS'		=> $this->language->lang('TOPIC_' . strtoupper($topic_status)),
291
-			'U_TOPIC_STATUS'	=> $base_url . "&amp;status=$topic_status",
290
+			'TOPIC_STATUS'		=> $this->language->lang('TOPIC_'.strtoupper($topic_status)),
291
+			'U_TOPIC_STATUS'	=> $base_url."&amp;status=$topic_status",
292 292
 		);
293 293
 	}
294 294
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 		if ($mode === 'mcp')
316 316
 		{
317 317
 			$u_mcp_queue = $this->get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id);
318
-			$u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&amp;mode=deleted_topics&amp;t=' . $topic_id, true, $this->user->session_id) : $u_mcp_queue;
318
+			$u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&amp;mode=deleted_topics&amp;t='.$topic_id, true, $this->user->session_id) : $u_mcp_queue;
319 319
 		}
320 320
 
321 321
 		return array(
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 	 */
332 332
 	protected function get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id)
333 333
 	{
334
-		return ($topic_unapproved || $posts_unapproved) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$topic_id", true, $this->user->session_id) : '';
334
+		return ($topic_unapproved || $posts_unapproved) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&amp;mode='.(($topic_unapproved) ? 'approve_details' : 'unapproved_posts')."&amp;t=$topic_id", true, $this->user->session_id) : '';
335 335
 	}
336 336
 
337 337
 	/**
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 			if ($mode === 'mcp')
349 349
 			{
350 350
 				$redirect_url = $this->get_redirect_url($u_action);
351
-				$u_delete = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'quickmod=1&amp;action=delete_topic&amp;t=' . $row['topic_id'] . '&amp;redirect=' . $redirect_url, true, $this->user->session_id);
351
+				$u_delete = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'quickmod=1&amp;action=delete_topic&amp;t='.$row['topic_id'].'&amp;redirect='.$redirect_url, true, $this->user->session_id);
352 352
 			}
353 353
 		}
354 354
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 	 */
362 362
 	protected function get_redirect_url($base_url)
363 363
 	{
364
-		$base_url .= (sizeof($this->params)) ? '&' . http_build_query($this->params) : '';
364
+		$base_url .= (sizeof($this->params)) ? '&'.http_build_query($this->params) : '';
365 365
 		return urlencode(str_replace('&amp;', '&', $base_url));
366 366
 	}
367 367
 
Please login to merge, or discard this patch.
services/feed.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	 * @param \phpbb\template\template		$template				Template object
42 42
 	 * @param \phpbb\user					$user					User object
43 43
 	 * @param string						$php_ext				php file extension
44
-	*/
44
+	 */
45 45
 	public function __construct(\phpbb\config\config $config, \phpbb\controller\helper $controller_helper, \phpbb\symfony_request $symfony_request, \phpbb\template\template $template, \phpbb\user $user, $php_ext)
46 46
 	{
47 47
 		$this->config = $config;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		$this->template->assign_vars(array(
64 64
 			'BOARD_URL'				=> $this->board_url,
65 65
 			'SELF_LINK'				=> $this->controller_helper->route($this->symfony_request->attributes->get('_route'), $this->symfony_request->attributes->get('_route_params'), true, '', UrlGeneratorInterface::ABSOLUTE_URL),
66
-			'FEED_LINK'				=> $this->board_url . $this->user->page['script_path'] . 'index.' . $this->php_ext,
66
+			'FEED_LINK'				=> $this->board_url.$this->user->page['script_path'].'index.'.$this->php_ext,
67 67
 			'FEED_TITLE'			=> $this->config['sitename'],
68 68
 			'FEED_SUBTITLE'			=> $this->config['site_desc'],
69 69
 			'FEED_UPDATED'			=> $max_update_time,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		$response = new Response($this->prepare_content($content));
89 89
 		$response->headers->set('Content-Type', 'application/atom+xml');
90 90
 		$response->setCharset('UTF-8');
91
-		$response->setLastModified(new \DateTime('@' . $max_update_time));
91
+		$response->setLastModified(new \DateTime('@'.$max_update_time));
92 92
 
93 93
 		if (!empty($this->user->data['is_bot']))
94 94
 		{
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 	{
108 108
 		// convert relative urls to absolute urls
109 109
 		$script_path = trim($this->user->page['script_path'], '/');
110
-		$full_path = $this->board_url . '/' . $script_path;
111
-		$content = preg_replace('/(href|src)=("|\')((?:\.*\/)+(?:' . $script_path . '\/)?)(.*?)("|\')/i', '$1=$2' . $full_path . '/$4$5', $content);
110
+		$full_path = $this->board_url.'/'.$script_path;
111
+		$content = preg_replace('/(href|src)=("|\')((?:\.*\/)+(?:'.$script_path.'\/)?)(.*?)("|\')/i', '$1=$2'.$full_path.'/$4$5', $content);
112 112
 
113 113
 		// remove hidden field labels
114 114
 		$content = preg_replace('#<div class="field-label label-hidden">(.*?)</div>#', '', $content);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		$content = preg_replace('/((?:\?|&)sid=[a-z0-9]+)/', '', $content);
118 118
 
119 119
 		// Remove Comments from inline attachments [ia]
120
-		$content = preg_replace('#<dd>(.*?)</dd>#','',$content);
120
+		$content = preg_replace('#<dd>(.*?)</dd>#', '', $content);
121 121
 
122 122
 		// Replace some entities with their unicode counterpart
123 123
 		$entities = array(
Please login to merge, or discard this patch.
services/comments/comments.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	{
88 88
 		if ($topic_data['total_comments'])
89 89
 		{
90
-			$view		= $this->request->variable('view', '');
91
-			$start		= $this->request->variable('start', 0);
92
-			$post_id	= $this->request->variable('p', 0);
90
+			$view = $this->request->variable('view', '');
91
+			$start = $this->request->variable('start', 0);
92
+			$post_id = $this->request->variable('p', 0);
93 93
 
94 94
 			$this->find_unread($view, $topic_data);
95 95
 
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
 				->build();
105 105
 			$posts_data = $this->forum->get_post_data(false, array(), $this->config['posts_per_page'], $start, array(
106 106
 				'WHERE'		=> array(
107
-					'p.topic_id = ' . (int) $topic_data['topic_id'],
108
-					'p.post_id <> ' . (int) $topic_data['topic_first_post_id'],
107
+					'p.topic_id = '.(int) $topic_data['topic_id'],
108
+					'p.post_id <> '.(int) $topic_data['topic_first_post_id'],
109 109
 				),
110
-				'ORDER_BY'	=> $this->sort_by_sql[$sort_key] . ' ' . $this->sort_dir_sql[$sort_dir],
110
+				'ORDER_BY'	=> $this->sort_by_sql[$sort_key].' '.$this->sort_dir_sql[$sort_dir],
111 111
 			));
112 112
 
113 113
 			$topic_tracking_info = $this->forum->get_topic_tracking_info();
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
 			$topic_last_read = (isset($topic_tracking_info[$topic_id])) ? $topic_tracking_info[$topic_id] : 0;
173 173
 
174 174
 			$sql = 'SELECT post_id, topic_id, forum_id
175
-				FROM ' . POSTS_TABLE . "
175
+				FROM ' . POSTS_TABLE."
176 176
 				WHERE topic_id = $topic_id
177
-					AND " . $this->content_visibility->get_visibility_sql('post', $forum_id) . "
177
+					AND ".$this->content_visibility->get_visibility_sql('post', $forum_id)."
178 178
 					AND post_time > $topic_last_read
179 179
 					AND forum_id = $forum_id
180 180
 				ORDER BY post_time ASC, post_id ASC";
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 			if ($row)
186 186
 			{
187
-				redirect(append_sid($topic_data['topic_url'], 'p=' . $row['post_id']) . '#p' . $row['post_id']);
187
+				redirect(append_sid($topic_data['topic_url'], 'p='.$row['post_id']).'#p'.$row['post_id']);
188 188
 			}
189 189
 		}
190 190
 	}
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 		$start = $this->pagination->validate_start($start, $this->config['posts_per_page'], $topic_data['total_comments']);
212 212
 		$this->pagination->generate_template_pagination($base_url, 'pagination', 'start', $topic_data['total_comments'], $this->config['posts_per_page'], $start);
213 213
 
214
-		$data =& $this->template_context->get_data_ref()['pagination'];
214
+		$data = & $this->template_context->get_data_ref()['pagination'];
215 215
 		foreach ($data as &$row)
216 216
 		{
217 217
 			$row['PAGE_URL'] .= '#comments';
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 	protected function get_prev_posts_count($forum_id, $topic_id, $post_id, $sort_dir)
274 274
 	{
275 275
 		$sql = 'SELECT post_id, post_time, post_visibility
276
-			FROM ' . POSTS_TABLE . " p
276
+			FROM ' . POSTS_TABLE." p
277 277
 			WHERE p.topic_id = $topic_id
278 278
 				AND p.post_id = $post_id";
279 279
 		$result = $this->db->sql_query($sql);
@@ -281,9 +281,9 @@  discard block
 block discarded – undo
281 281
 		$this->db->sql_freeresult($result);
282 282
 
283 283
 		$sql = 'SELECT COUNT(p.post_id) AS prev_posts
284
-			FROM ' . POSTS_TABLE . " p
284
+			FROM ' . POSTS_TABLE." p
285 285
 			WHERE p.topic_id = $topic_id
286
-				AND " . $this->content_visibility->get_visibility_sql('post', $forum_id, 'p.');
286
+				AND ".$this->content_visibility->get_visibility_sql('post', $forum_id, 'p.');
287 287
 
288 288
 		if ($sort_dir == 'd')
289 289
 		{
@@ -310,11 +310,11 @@  discard block
 block discarded – undo
310 310
 	 */
311 311
 	protected function set_sorting_options(&$sort_days, &$sort_key, &$sort_dir, &$u_sort_param)
312 312
 	{
313
-		$default_sort_days	= (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0;
313
+		$default_sort_days = (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0;
314 314
 		$default_sort_key	= (!empty($this->user->data['user_post_sortby_type'])) ? $this->user->data['user_post_sortby_type'] : 't';
315 315
 		$default_sort_dir	= (!empty($this->user->data['user_post_sortby_dir'])) ? $this->user->data['user_post_sortby_dir'] : 'a';
316 316
 
317
-		$sort_days	= $this->request->variable('st', $default_sort_days);
317
+		$sort_days = $this->request->variable('st', $default_sort_days);
318 318
 		$sort_key	= $this->request->variable('sk', $default_sort_key);
319 319
 		$sort_dir	= $this->request->variable('sd', $default_sort_dir);
320 320
 
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 	 */
377 377
 	protected function get_post_display_lang(array $row, $topic_url)
378 378
 	{
379
-		return ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $row['post_id'] . '" href="' . append_sid($topic_url, "p={$row['post_id']}&amp;view=show") . "#p{$row['post_id']}" . '">', '</a>') : '';
379
+		return ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="'.$row['post_id'].'" href="'.append_sid($topic_url, "p={$row['post_id']}&amp;view=show")."#p{$row['post_id']}".'">', '</a>') : '';
380 380
 	}
381 381
 
382 382
 	/**
@@ -386,6 +386,6 @@  discard block
 block discarded – undo
386 386
 	 */
387 387
 	protected function set_form_action($topic_url, $start)
388 388
 	{
389
-		$this->template->assign_var('S_TOPIC_ACTION', append_sid($topic_url, (($start == 0) ? '' : "start=$start")) . '#comments');
389
+		$this->template->assign_var('S_TOPIC_ACTION', append_sid($topic_url, (($start == 0) ? '' : "start=$start")).'#comments');
390 390
 	}
391 391
 }
Please login to merge, or discard this patch.
event/feed.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	 * @param \phpbb\db\driver\driver_interface		$db					Database connection
33 33
 	 * @param \phpbb\template\template				$template			Template object
34 34
 	 * @param \blitze\content\services\types		$content_types		Content types object
35
-	*/
35
+	 */
36 36
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, \blitze\content\services\types $content_types)
37 37
 	{
38 38
 		$this->config = $config;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 		$sql_ary = $event['sql_ary'];
64 64
 
65 65
 		$forum_ids = array_keys($this->content_types->get_forum_types());
66
-		$sql_ary['WHERE'] .= ' AND ' . $this->db->sql_in_set('f.forum_id', array_map('intval', $forum_ids), true);
66
+		$sql_ary['WHERE'] .= ' AND '.$this->db->sql_in_set('f.forum_id', array_map('intval', $forum_ids), true);
67 67
 
68 68
 		$event['sql_ary'] = $sql_ary;
69 69
 	}
Please login to merge, or discard this patch.