Completed
Push — develop ( 755a17...843010 )
by Daniel
07:33
created
services/poll.php 1 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 \blitze\sitemaker\services\poll		$poll			Poll Object
24 24
 	 * @param \blitze\sitemaker\services\template	$ptemplate		Sitemaker Template Object
25
-	*/
25
+	 */
26 26
 	public function __construct(\blitze\sitemaker\services\poll $poll, \blitze\sitemaker\services\template $ptemplate)
27 27
 	{
28 28
 		$this->poll = $poll;
Please login to merge, or discard this patch.
services/form/field/base.php 1 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/form/field/image.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 		$value = $this->request->variable($name, $value);
20 20
 		$value = $this->get_image_src($value);
21 21
 
22
-		return ($value) ? '[img]' . $value . '[/img]' : '';
22
+		return ($value) ? '[img]'.$value.'[/img]' : '';
23 23
 	}
24 24
 
25 25
 	/**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		$data['field_value'] = $this->get_image_src($bbcode_value);
35 35
 
36 36
 		$this->ptemplate->assign_vars($data);
37
-		$field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field . '_field');
37
+		$field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field.'_field');
38 38
 
39 39
 		$data['field_value'] = $bbcode_value;
40 40
 
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 		$image = '';
50 50
 		if ($data['field_value'])
51 51
 		{
52
-			$image = '<figure class="img-ui">' . $data['field_value'] . '</figure>';
52
+			$image = '<figure class="img-ui">'.$data['field_value'].'</figure>';
53 53
 			if ($mode !== 'block')
54 54
 			{
55
-				$image = '<div class="' . join(' ', array_filter($data['field_props'])) . '">' . $image . '</div>';
55
+				$image = '<div class="'.join(' ', array_filter($data['field_props'])).'">'.$image.'</div>';
56 56
 			}
57 57
 		}
58 58
 		return $image;
Please login to merge, or discard this patch.
services/form/field/telephone.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	 */
37 37
 	public function display_field(array $data)
38 38
 	{
39
-		return $data['field_value'] ? '<a href="tel:' . $data['field_value'] . '">' . preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "$1-$2-$3", $data['field_value']) . '</a>' : '';
39
+		return $data['field_value'] ? '<a href="tel:'.$data['field_value'].'">'.preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "$1-$2-$3", $data['field_value']).'</a>' : '';
40 40
 	}
41 41
 
42 42
 	/**
Please login to merge, or discard this patch.
services/form/field/choice.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	public function get_field_value($name, $default)
30 30
 	{
31 31
 		$default = is_array($default) ? $default : explode("\n", $default);
32
-		$value =  $this->request->variable($name, $default, true);
32
+		$value = $this->request->variable($name, $default, true);
33 33
 
34 34
 		if (empty($value) && $this->request->server('REQUEST_METHOD') !== 'POST')
35 35
 		{
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		$this->ptemplate->assign_vars($data);
63 63
 
64 64
 		$tpl_name = ($data['field_type'] === 'select') ? 'select' : 'pickem';
65
-		return $this->ptemplate->render_view('blitze/content', "fields/$tpl_name.html", $data['field_type'] . '_field');
65
+		return $this->ptemplate->render_view('blitze/content', "fields/$tpl_name.html", $data['field_type'].'_field');
66 66
 	}
67 67
 
68 68
 	/**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			foreach ($choices as $value => $option)
86 86
 			{
87 87
 				$options[] = array(
88
-					'id'		=> 'smc-'. $name . '-' . $count,
88
+					'id'		=> 'smc-'.$name.'-'.$count,
89 89
 					'label'		=> $this->language->lang($option),
90 90
 					'selected'	=> (int) (in_array($value, $selected)),
91 91
 					'value'		=> $value,
Please login to merge, or discard this patch.
services/form/form.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -197,8 +197,7 @@  discard block
 block discarded – undo
197 197
 			if ($previewing || empty($row['field_props']['is_db_field']))
198 198
 			{
199 199
 				$fields_data[$field] = $value;
200
-			}
201
-			else
200
+			} else
202 201
 			{
203 202
 				$this->db_fields[$field] = $value;
204 203
 			}
@@ -238,14 +237,12 @@  discard block
 block discarded – undo
238 237
 		if (!empty($field_value))
239 238
 		{
240 239
 			$this->errors[] = $obj->validate_field($row);
241
-		}
242
-		else if ($row['field_required'])
240
+		} else if ($row['field_required'])
243 241
 		{
244 242
 			if (!$row['field_mod_only'] || $cp_class === 'mcp')
245 243
 			{
246 244
 				$this->errors[] = $this->language->lang_array('FIELD_REQUIRED', array($row['field_label']));
247
-			}
248
-			else
245
+			} else
249 246
 			{
250 247
 				$req_mod_input = true;
251 248
 			}
Please login to merge, or discard this patch.
services/comments/comments.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 	 * @param \blitze\content\services\topic			$topic				Topic object
59 59
 	 * @param string									$root_path			Path to the phpbb directory.
60 60
 	 * @param string									$php_ext			php file extension
61
-	*/
61
+	 */
62 62
 	public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\content_visibility $content_visibility, \phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\request\request_interface $request, \phpbb\template\template $template, \phpbb\template\context $template_context, \phpbb\user $user, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\topic $topic, $root_path, $php_ext)
63 63
 	{
64 64
 		parent::__construct($auth, $config, $language, $template, $user, $root_path, $php_ext);
Please login to merge, or discard this 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();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		$attachments = $this->forum->get_attachments($topic_data['forum_id']);
134 134
 
135 135
 		$this->template->assign_vars(array(
136
-			'S_TOPIC_ACTION' => append_sid($topic_data['topic_url'], (($start == 0) ? '' : "?start=$start")) . '#comments',
136
+			'S_TOPIC_ACTION' => append_sid($topic_data['topic_url'], (($start == 0) ? '' : "?start=$start")).'#comments',
137 137
 		));
138 138
 
139 139
 		for ($i = 0, $size = sizeof($posts_data); $i < $size; $i++)
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 				'S_POST_REPORTED'			=> ($row['post_reported'] && $this->auth->acl_get('m_report', $forum_id)) ? true : false,
151 151
 				'S_TOPIC_POSTER'			=> ($topic_data['topic_poster'] == $poster_id) ? true : false,
152 152
 				'S_POST_HIDDEN'				=> $row['hide_post'],
153
-				'L_POST_DISPLAY'			=> ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $row['post_id'] . '" href="' . $viewtopic_url . "&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}" . '">', '</a>') : '',
153
+				'L_POST_DISPLAY'			=> ($row['hide_post']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="'.$row['post_id'].'" href="'.$viewtopic_url."&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}".'">', '</a>') : '',
154 154
 			)));
155 155
 
156 156
 			$this->topic->show_attachments($attachments, $row['post_id'], 'postrow.attachment');
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
 			$topic_last_read = (isset($topic_tracking_info[$topic_id])) ? $topic_tracking_info[$topic_id] : 0;
175 175
 	
176 176
 			$sql = 'SELECT post_id, topic_id, forum_id
177
-				FROM ' . POSTS_TABLE . "
177
+				FROM ' . POSTS_TABLE."
178 178
 				WHERE topic_id = $topic_id
179
-					AND " . $this->content_visibility->get_visibility_sql('post', $forum_id) . "
179
+					AND ".$this->content_visibility->get_visibility_sql('post', $forum_id)."
180 180
 					AND post_time > $topic_last_read
181 181
 					AND forum_id = $forum_id
182 182
 				ORDER BY post_time ASC, post_id ASC";
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 			if ($row)
188 188
 			{
189
-				redirect(append_sid($topic_data['topic_url'], 'p=' . $row['post_id']) . '#p' . $row['post_id']);
189
+				redirect(append_sid($topic_data['topic_url'], 'p='.$row['post_id']).'#p'.$row['post_id']);
190 190
 			}
191 191
 		}
192 192
 	 }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 		$start = $this->pagination->validate_start($start, $this->config['posts_per_page'], $topic_data['total_comments']);
214 214
 		$this->pagination->generate_template_pagination($base_url, 'pagination', 'start', $topic_data['total_comments'], $this->config['posts_per_page'], $start);
215 215
 
216
-		$data =& $this->template_context->get_data_ref();
216
+		$data = & $this->template_context->get_data_ref();
217 217
 		foreach ($data['pagination'] as &$row)
218 218
 		{
219 219
 			$row['PAGE_URL'] .= '#comments';
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 	protected function get_prev_posts_count($forum_id, $topic_id, $post_id, $sort_dir)
276 276
 	{
277 277
 		$sql = 'SELECT post_id, post_time, post_visibility
278
-			FROM ' . POSTS_TABLE . " p
278
+			FROM ' . POSTS_TABLE." p
279 279
 			WHERE p.topic_id = $topic_id
280 280
 				AND p.post_id = $post_id";
281 281
 		$result = $this->db->sql_query($sql);
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
 		$this->db->sql_freeresult($result);
284 284
 
285 285
 		$sql = 'SELECT COUNT(p.post_id) AS prev_posts
286
-			FROM ' . POSTS_TABLE . " p
286
+			FROM ' . POSTS_TABLE." p
287 287
 			WHERE p.topic_id = $topic_id
288
-				AND " . $this->content_visibility->get_visibility_sql('post', $forum_id, 'p.');
288
+				AND ".$this->content_visibility->get_visibility_sql('post', $forum_id, 'p.');
289 289
 
290 290
 		if ($sort_dir == 'd')
291 291
 		{
@@ -312,11 +312,11 @@  discard block
 block discarded – undo
312 312
 	 */
313 313
 	protected function set_sorting_options(&$sort_days, &$sort_key, &$sort_dir, &$u_sort_param)
314 314
 	{
315
-		$default_sort_days	= (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0;
315
+		$default_sort_days = (!empty($this->user->data['user_post_show_days'])) ? $this->user->data['user_post_show_days'] : 0;
316 316
 		$default_sort_key	= (!empty($this->user->data['user_post_sortby_type'])) ? $this->user->data['user_post_sortby_type'] : 't';
317 317
 		$default_sort_dir	= (!empty($this->user->data['user_post_sortby_dir'])) ? $this->user->data['user_post_sortby_dir'] : 'a';
318 318
 
319
-		$sort_days	= $this->request->variable('st', $default_sort_days);
319
+		$sort_days = $this->request->variable('st', $default_sort_days);
320 320
 		$sort_key	= $this->request->variable('sk', $default_sort_key);
321 321
 		$sort_dir	= $this->request->variable('sd', $default_sort_dir);
322 322
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -258,8 +258,7 @@  discard block
 block discarded – undo
258 258
 				$prev_posts_count = $this->content_visibility->get_count('topic_posts', $topic_data, $topic_data['forum_id']) - 1;
259 259
 			}
260 260
 			return $prev_posts_count;
261
-		}
262
-		else
261
+		} else
263 262
 		{
264 263
 			return $this->get_prev_posts_count($topic_data['forum_id'], $topic_data['topic_id'], $post_id, $sort_dir) - 1;
265 264
 		}
@@ -290,8 +289,7 @@  discard block
 block discarded – undo
290 289
 		if ($sort_dir == 'd')
291 290
 		{
292 291
 			$sql .= " AND (p.post_time > {$row['post_time']} OR (p.post_time = {$row['post_time']} AND p.post_id >= {$row['post_id']}))";
293
-		}
294
-		else
292
+		} else
295 293
 		{
296 294
 			$sql .= " AND (p.post_time < {$row['post_time']} OR (p.post_time = {$row['post_time']} AND p.post_id <= {$row['post_id']}))";
297 295
 		}
Please login to merge, or discard this patch.
services/notification/topic_in_queue.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@
 block discarded – undo
34 34
 	}
35 35
 
36 36
 	/**
37
-	* Get the url to this item
38
-	*
39
-	* @return string URL
40
-	*/
37
+	 * Get the url to this item
38
+	 *
39
+	 * @return string URL
40
+	 */
41 41
 	public function get_url()
42 42
 	{
43 43
 		if ($type = $this->types->get_forum_type($this->item_parent_id))
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	{
43 43
 		if ($type = $this->types->get_forum_type($this->item_parent_id))
44 44
 		{
45
-			return append_sid($this->phpbb_root_path . 'mcp.' . $this->php_ext, "i=-blitze-content-mcp-content_module&amp;mode=content&amp;type=$type&amp;t={$this->item_id}&amp;do=view");
45
+			return append_sid($this->phpbb_root_path.'mcp.'.$this->php_ext, "i=-blitze-content-mcp-content_module&amp;mode=content&amp;type=$type&amp;t={$this->item_id}&amp;do=view");
46 46
 		}
47 47
 
48 48
 		return parent::get_url();
Please login to merge, or discard this patch.
services/actions/type/add.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 	 * @param \blitze\sitemaker\services\auto_lang				$auto_lang				Auto add lang file
56 56
 	 * @param \blitze\content\services\form\fields_factory		$fields_factory			Fields factory  object
57 57
 	 * @param \blitze\content\services\views\views_factory		$views_factory			Views factory object
58
-	*/
58
+	 */
59 59
 	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)
60 60
 	{
61 61
 		$this->auth = $auth;
Please login to merge, or discard this patch.