Completed
Push — develop ( 755a17...843010 )
by Daniel
07:33
created
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/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/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.
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.