Completed
Push — develop ( 4a255f...c77227 )
by Daniel
07:47
created
services/types.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@
 block discarded – undo
84 84
 			if ($trigger_error)
85 85
 			{
86 86
 				throw new \blitze\sitemaker\exception\out_of_bounds($type);
87
-			}
88
-			else
87
+			} else
89 88
 			{
90 89
 				return false;
91 90
 			}
Please login to merge, or discard this patch.
services/form/field/base.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,12 +134,10 @@
 block discarded – undo
134 134
 		if ($this->is_too_short($data, $length))
135 135
 		{
136 136
 			return $this->language->lang('FIELD_TOO_SHORT', $data['field_label'], $data['field_minlength']);
137
-		}
138
-		else if ($this->is_too_long($data, $length))
137
+		} else if ($this->is_too_long($data, $length))
139 138
 		{
140 139
 			return $this->language->lang('FIELD_TOO_LONG', $data['field_label'], $data['field_maxlength']);
141
-		}
142
-		else
140
+		} else
143 141
 		{
144 142
 			return $this->language->lang('FIELD_INVALID', $data['field_label']);
145 143
 		}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		$this->ptemplate->assign_vars($data);
70 70
 
71 71
 		$field = $this->get_name();
72
-		return $this->ptemplate->render_view('blitze/content', "fields/$field.html", $field . '_field');
72
+		return $this->ptemplate->render_view('blitze/content', "fields/$field.html", $field.'_field');
73 73
 	}
74 74
 
75 75
 	/**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function get_langname()
87 87
 	{
88
-		return strtoupper('FORM_FIELD_' . $this->get_name());
88
+		return strtoupper('FORM_FIELD_'.$this->get_name());
89 89
 	}
90 90
 
91 91
 	/**
Please login to merge, or discard this patch.
services/template/loader.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,8 +127,7 @@
 block discarded – undo
127 127
 		{
128 128
 			$data = $this->blocks_data[$id];
129 129
 			$column_name = 'block_tpl';
130
-		}
131
-		else
130
+		} else
132 131
 		{
133 132
 			$data = $this->content_types[$id];
134 133
 			$column_name = $view . '_tpl';
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
 		else
132 132
 		{
133 133
 			$data = $this->content_types[$id];
134
-			$column_name = $view . '_tpl';
134
+			$column_name = $view.'_tpl';
135 135
 		}
136 136
 
137 137
 		$return = array(
Please login to merge, or discard this patch.
services/actions/topic/moderate.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@  discard block
 block discarded – undo
70 70
 		{
71 71
 			$forum_ids = $this->get_selected_forum_ids($topic_ids);
72 72
 			$this->{$action}($topic_ids, $forum_ids);
73
-		}
74
-		else
73
+		} else
75 74
 		{
76 75
 			$message =  $this->language->lang('INVALID_REQUEST', $action);
77 76
 			trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $u_action . '">', '</a>'));
@@ -113,8 +112,7 @@  discard block
 block discarded – undo
113 112
 		{
114 113
 			$this->approve($topic_ids, $forum_ids, false);
115 114
 			\mcp_queue::disapprove_posts($post_id_list, '-blitze-content-mcp-content_module', 'content');
116
-		}
117
-		else
115
+		} else
118 116
 		{
119 117
 			trigger_error('NO_POST_SELECTED');
120 118
 		}
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 		}
74 74
 		else
75 75
 		{
76
-			$message =  $this->language->lang('INVALID_REQUEST', $action);
77
-			trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $u_action . '">', '</a>'));
76
+			$message = $this->language->lang('INVALID_REQUEST', $action);
77
+			trigger_error($message.'<br /><br />'.$this->language->lang('RETURN_PAGE', '<a href="'.$u_action.'">', '</a>'));
78 78
 		}
79 79
 	}
80 80
 
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	protected function approve(array $topic_ids, array $forum_ids, $execute = true)
88 88
 	{
89
-		include($this->phpbb_root_path . 'includes/mcp/mcp_queue.' . $this->php_ext);
90
-		include($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext);
89
+		include($this->phpbb_root_path.'includes/mcp/mcp_queue.'.$this->php_ext);
90
+		include($this->phpbb_root_path.'includes/functions_messenger.'.$this->php_ext);
91 91
 
92 92
 		if (!(sizeof(array_intersect_key($forum_ids, $this->auth->acl_getf('m_approve', true)))))
93 93
 		{
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	protected function resync(array $topic_ids)
151 151
 	{
152
-		include($this->phpbb_root_path . 'includes/mcp/mcp_forum.' . $this->php_ext);
152
+		include($this->phpbb_root_path.'includes/mcp/mcp_forum.'.$this->php_ext);
153 153
 
154 154
 		mcp_resync_topics($topic_ids);
155 155
 	}
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 		}
230 230
 
231 231
 		$sql = 'SELECT forum_id
232
-			FROM ' . TOPICS_TABLE . '
232
+			FROM ' . TOPICS_TABLE.'
233 233
 			WHERE ' . $this->db->sql_in_set('topic_id', $topic_ids);
234 234
 		$result = $this->db->sql_query($sql);
235 235
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 		}
258 258
 
259 259
 		$sql = 'SELECT post_id
260
-			FROM ' . POSTS_TABLE . '
260
+			FROM ' . POSTS_TABLE.'
261 261
 			WHERE ' . $this->db->sql_in_set('topic_id', $topic_ids);
262 262
 		$result = $this->db->sql_query($sql);
263 263
 
Please login to merge, or discard this patch.
services/actions/topic/index.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -272,16 +272,13 @@
 block discarded – undo
272 272
 		if ($topic_deleted)
273 273
 		{
274 274
 			$topic_status = 'deleted';
275
-		}
276
-		else if ($topic_unapproved)
275
+		} else if ($topic_unapproved)
277 276
 		{
278 277
 			$topic_status = 'unapproved';
279
-		}
280
-		else if ($row['topic_time'] > time())
278
+		} else if ($row['topic_time'] > time())
281 279
 		{
282 280
 			$topic_status = 'scheduled';
283
-		}
284
-		else
281
+		} else
285 282
 		{
286 283
 			$topic_status = $this->filter_topic_types_ary[$row['topic_type']];
287 284
 		}
Please login to merge, or discard this 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) ? '&amp;' : '');
109
+			$callable = 'init_'.$mode.'_mode';
110
+			$this->base_url = $u_action.(sizeof($this->params) ? '&amp;' : '');
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
 			'U_DELETE'			=> $this->get_delete_url($mode, $u_action, $row, $post_row),
177 177
 		);
178 178
 	}
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 			'S_CAN_MAKE_NORMAL'		=> ($s_can_make_sticky || $s_can_make_announce),
199 199
 			'S_CAN_MAKE_STICKY'		=> $s_can_make_sticky,
200 200
 			'S_CAN_MAKE_ANNOUNCE'	=> $s_can_make_announce,
201
-			'U_MCP_ACTION'			=> $this->base_url . '&amp;do=moderate&amp;redirect=' . $this->get_redirect_url($this->base_url),
201
+			'U_MCP_ACTION'			=> $this->base_url.'&amp;do=moderate&amp;redirect='.$this->get_redirect_url($this->base_url),
202 202
 		));
203 203
 	}
204 204
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 	 */
209 209
 	protected function init_ucp_mode(array $content_types, array &$sql_where_array)
210 210
 	{
211
-		$sql_where_array[] =  't.topic_poster = ' . (int) $this->user->data['user_id'];
211
+		$sql_where_array[] = 't.topic_poster = '.(int) $this->user->data['user_id'];
212 212
 
213 213
 		// list all content types that the user can post in
214 214
 		$postable_forums = array_intersect_key($this->content_forums, $this->auth->acl_getf('f_post', true));
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 			$this->template->assign_block_vars('postable', array(
221 221
 				'TYPE'		=> $entity->get_content_langname(),
222 222
 				'COLOUR'	=> $entity->get_content_colour(),
223
-				'U_POST'	=> append_sid("{$this->phpbb_root_path}posting." . $this->php_ext, 'mode=post&amp;f=' . $entity->get_forum_id()),
223
+				'U_POST'	=> append_sid("{$this->phpbb_root_path}posting.".$this->php_ext, 'mode=post&amp;f='.$entity->get_forum_id()),
224 224
 			));
225 225
 		}
226 226
 	}
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 			'CONTENT_TYPE'			=> $entity->get_content_langname(),
239 239
 			'CONTENT_TYPE_COLOR'	=> $entity->get_content_colour(),
240 240
 			'S_COMMENTS'			=> $entity->get_allow_comments(),
241
-			'U_CONTENT_TYPE'		=> $base_url . "&amp;type=$type",
241
+			'U_CONTENT_TYPE'		=> $base_url."&amp;type=$type",
242 242
 		);
243 243
 	}
244 244
 
@@ -288,8 +288,8 @@  discard block
 block discarded – undo
288 288
 		}
289 289
 
290 290
 		return array(
291
-			'TOPIC_STATUS'		=> $this->language->lang('TOPIC_' . strtoupper($topic_status)),
292
-			'U_TOPIC_STATUS'	=> $base_url . "&amp;status=$topic_status",
291
+			'TOPIC_STATUS'		=> $this->language->lang('TOPIC_'.strtoupper($topic_status)),
292
+			'U_TOPIC_STATUS'	=> $base_url."&amp;status=$topic_status",
293 293
 		);
294 294
 	}
295 295
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 		if ($mode === 'mcp')
317 317
 		{
318 318
 			$u_mcp_queue = $this->get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id);
319
-			$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
+			$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;
320 320
 		}
321 321
 
322 322
 		return array(
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 	 */
333 333
 	protected function get_mcp_queue_url($topic_unapproved, $posts_unapproved, $topic_id)
334 334
 	{
335
-		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
+		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) : '';
336 336
 	}
337 337
 
338 338
 	/**
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 			if ($mode === 'mcp')
350 350
 			{
351 351
 				$redirect_url = $this->get_redirect_url($u_action);
352
-				$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
+				$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);
353 353
 			}
354 354
 		}
355 355
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 	 */
363 363
 	protected function get_redirect_url($base_url)
364 364
 	{
365
-		$base_url .= (sizeof($this->params)) ? '&' . http_build_query($this->params) : '';
365
+		$base_url .= (sizeof($this->params)) ? '&'.http_build_query($this->params) : '';
366 366
 		return urlencode(str_replace('&amp;', '&', $base_url));
367 367
 	}
368 368
 
Please login to merge, or discard this patch.
controller/ucp_controller.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	 *
23 23
 	 * @param \phpbb\language\language					$language			Language object
24 24
 	 * @param \blitze\content\services\action_handler	$action_handler		Handles actions
25
-	*/
25
+	 */
26 26
 	public function __construct(\phpbb\language\language $language, \blitze\content\services\action_handler $action_handler)
27 27
 	{
28 28
 		$this->language = $language;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 		{
43 43
 			$command = $this->action_handler->create('topic', $action);
44 44
 			$command->execute($base_url, 'ucp');
45
-		}
46
-		catch (\blitze\sitemaker\exception\base $e)
45
+		} catch (\blitze\sitemaker\exception\base $e)
47 46
 		{
48 47
 			$message = $e->get_message($this->language);
49 48
 			trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $base_url . '">', '</a>'));
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 		catch (\blitze\sitemaker\exception\base $e)
47 47
 		{
48 48
 			$message = $e->get_message($this->language);
49
-			trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $base_url . '">', '</a>'));
49
+			trigger_error($message.'<br /><br />'.$this->language->lang('RETURN_PAGE', '<a href="'.$base_url.'">', '</a>'));
50 50
 		}
51 51
 	}
52 52
 }
Please login to merge, or discard this patch.
controller/mcp_controller.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 		{
43 43
 			$command = $this->action_handler->create('topic', $action);
44 44
 			$command->execute($base_url, 'mcp');
45
-		}
46
-		catch (\blitze\sitemaker\exception\base $e)
45
+		} catch (\blitze\sitemaker\exception\base $e)
47 46
 		{
48 47
 			$message = $e->get_message($this->language);
49 48
 			trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $base_url . '">', '</a>'));
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	 *
23 23
 	 * @param \phpbb\language\language					$language			Language object
24 24
 	 * @param \blitze\content\services\action_handler	$action_handler		Handles actions
25
-	*/
25
+	 */
26 26
 	public function __construct(\phpbb\language\language $language, \blitze\content\services\action_handler $action_handler)
27 27
 	{
28 28
 		$this->language = $language;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 		catch (\blitze\sitemaker\exception\base $e)
47 47
 		{
48 48
 			$message = $e->get_message($this->language);
49
-			trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $base_url . '">', '</a>'));
49
+			trigger_error($message.'<br /><br />'.$this->language->lang('RETURN_PAGE', '<a href="'.$base_url.'">', '</a>'));
50 50
 		}
51 51
 	}
52 52
 }
Please login to merge, or discard this patch.
controller/admin_controller.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	 *
23 23
 	 * @param \phpbb\language\language					$language			Language object
24 24
 	 * @param \blitze\content\services\action_handler	$action_handler		Handles actions
25
-	*/
25
+	 */
26 26
 	public function __construct(\phpbb\language\language $language, \blitze\content\services\action_handler $action_handler)
27 27
 	{
28 28
 		$this->language = $language;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 		catch (\blitze\sitemaker\exception\base $e)
48 48
 		{
49 49
 			$message = $e->get_message($this->language);
50
-			trigger_error($this->language->lang($message) . adm_back_link($base_url), E_USER_WARNING);
50
+			trigger_error($this->language->lang($message).adm_back_link($base_url), E_USER_WARNING);
51 51
 		}
52 52
 	}
53 53
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@
 block discarded – undo
43 43
 		{
44 44
 			$command = $this->action_handler->create('type', $action);
45 45
 			$command->execute($base_url, $type);
46
-		}
47
-		catch (\blitze\sitemaker\exception\base $e)
46
+		} catch (\blitze\sitemaker\exception\base $e)
48 47
 		{
49 48
 			$message = $e->get_message($this->language);
50 49
 			trigger_error($this->language->lang($message) . adm_back_link($base_url), E_USER_WARNING);
Please login to merge, or discard this patch.
model/mapper/fields.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 	 */
26 26
 	protected function _find_sql(array $sql_where)
27 27
 	{
28
-		return 'SELECT * FROM ' . $this->entity_table .
29
-			((sizeof($sql_where)) ? ' WHERE ' . join(' AND ', $sql_where) : '') . '
28
+		return 'SELECT * FROM '.$this->entity_table.
29
+			((sizeof($sql_where)) ? ' WHERE '.join(' AND ', $sql_where) : '').'
30 30
 			ORDER BY field_order ASC';
31 31
 	}
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 */
36 36
 	public function get_max_field_id()
37 37
 	{
38
-		$result = $this->db->sql_query('SELECT MAX(' . $this->entity_pkey . ') AS max_id FROM ' . $this->entity_table);
38
+		$result = $this->db->sql_query('SELECT MAX('.$this->entity_pkey.') AS max_id FROM '.$this->entity_table);
39 39
 		$max_id = $this->db->sql_fetchfield('max_id');
40 40
 		$this->db->sql_freeresult($result);
41 41
 
Please login to merge, or discard this patch.