Passed
Push — master ( 8badc5...5ddee1 )
by Stanislav
16:25 queued 13:42
created
core/controller/file.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@
 block discarded – undo
316 316
 
317 317
 	public function generate_image_src()
318 318
 	{
319
-		$this->image_src = $this->path  . $this->data['image_filename'];
319
+		$this->image_src = $this->path . $this->data['image_filename'];
320 320
 
321 321
 		if ($this->data['image_filemissing'] || !file_exists($this->path_source . $this->data['image_filename']))
322 322
 		{
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
 	}
105 105
 
106 106
 	/**
107
-	* Image File Controller
108
-	*	Route: gallery/image/{image_id}/source
109
-	*
110
-	* @param	int		$image_id
111
-	* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
112
-	*/
107
+	 * Image File Controller
108
+	 *	Route: gallery/image/{image_id}/source
109
+	 *
110
+	 * @param	int		$image_id
111
+	 * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
112
+	 */
113 113
 	public function source($image_id)
114 114
 	{
115 115
 		$this->auth->load_user_permissions($this->user->data['user_id']);
@@ -160,12 +160,12 @@  discard block
 block discarded – undo
160 160
 	}
161 161
 
162 162
 	/**
163
-	* Image File Controller
164
-	*	Route: gallery/image/{image_id}/medium
165
-	*
166
-	* @param	int		$image_id
167
-	* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
168
-	*/
163
+	 * Image File Controller
164
+	 *	Route: gallery/image/{image_id}/medium
165
+	 *
166
+	 * @param	int		$image_id
167
+	 * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
168
+	 */
169 169
 	public function medium($image_id)
170 170
 	{
171 171
 
@@ -195,12 +195,12 @@  discard block
 block discarded – undo
195 195
 	}
196 196
 
197 197
 	/**
198
-	* Image File Controller
199
-	*	Route: gallery/image/{image_id}/mini
200
-	*
201
-	* @param	int		$image_id
202
-	* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
203
-	*/
198
+	 * Image File Controller
199
+	 *	Route: gallery/image/{image_id}/mini
200
+	 *
201
+	 * @param	int		$image_id
202
+	 * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
203
+	 */
204 204
 	public function mini($image_id)
205 205
 	{
206 206
 		$this->path = $this->path_mini;
@@ -356,11 +356,11 @@  discard block
 block discarded – undo
356 356
 	}
357 357
 
358 358
 	/**
359
-	* Image File Controller
360
-	*	Route: gallery/image/{image_id}/x
361
-	*
362
-	* @return \Symfony\Component\HttpFoundation\BinaryFileResponseResponse A Symfony Response object
363
-	*/
359
+	 * Image File Controller
360
+	 *	Route: gallery/image/{image_id}/x
361
+	 *
362
+	 * @return \Symfony\Component\HttpFoundation\BinaryFileResponseResponse A Symfony Response object
363
+	 */
364 364
 	public function display()
365 365
 	{
366 366
 		$this->tool->set_last_modified($this->gallery_user->get_data('user_permissions_changed'));
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -238,8 +238,7 @@  discard block
 block discarded – undo
238 238
 			$this->data['album_user_id'] = 1;
239 239
 			$this->data['image_filemissing'] = 0;
240 240
 			$this->data['album_watermark'] = 0;
241
-		}
242
-		else
241
+		} else
243 242
 		{
244 243
 			$sql = 'SELECT *
245 244
 				FROM ' . $this->table_images . ' i
@@ -409,8 +408,7 @@  discard block
 block discarded – undo
409 408
 			{
410 409
 				$response->headers->set('expires', '-1');
411 410
 			}
412
-		}
413
-		else
411
+		} else
414 412
 		{
415 413
 			$response->headers->set('Content-Disposition', 'inline; ' . $this->tool->header_filename(htmlspecialchars_decode($this->tool->image_name) . '.' . $this->tool->image_type));
416 414
 			if ($this->tool->is_ie_greater7($this->user->browser))
Please login to merge, or discard this patch.
core/controller/upload.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -249,8 +249,7 @@  discard block
 block discarded – undo
249 249
 					'last_image'	=> end($process->images),
250 250
 				);
251 251
 				$this->notification_helper->new_image($data);
252
-			}
253
-			else
252
+			} else
254 253
 			{
255 254
 				$target = array(
256 255
 					'album_id'	=>	$album_id,
@@ -355,8 +354,7 @@  discard block
 block discarded – undo
355 354
 					{
356 355
 						$this->language->add_lang('ucp');
357 356
 						$error_array[] = $this->language->lang($result . '_USERNAME');
358
-					}
359
-					else
357
+					} else
360 358
 					{
361 359
 						$process->set_username($username);
362 360
 					}
@@ -375,8 +373,7 @@  discard block
 block discarded – undo
375 373
 				if (!$process->uploaded_files)
376 374
 				{
377 375
 					$process->new_error($this->language->lang('UPLOAD_NO_FILE'));
378
-				}
379
-				else
376
+				} else
380 377
 				{
381 378
 					$mode = 'upload_edit';
382 379
 					// Remove submit, so we get the first screen of step 2.
@@ -422,8 +419,7 @@  discard block
 block discarded – undo
422 419
 						if ($VAR == 'zip')
423 420
 						{
424 421
 							continue;
425
-						}
426
-						else
422
+						} else
427 423
 						{
428 424
 							$filetypes[] = $VAR;
429 425
 						}
@@ -523,8 +519,7 @@  discard block
 block discarded – undo
523 519
 						'last_image'	=> end($process->images),
524 520
 					);
525 521
 					$this->notification_helper->new_image($data);
526
-				}
527
-				else
522
+				} else
528 523
 				{
529 524
 					$target = array(
530 525
 						'album_id'	=>	(int) $album_id,
@@ -591,8 +586,7 @@  discard block
 block discarded – undo
591 586
 		if (file_exists($phpbbgallery_core_file) && is_writable($phpbbgallery_core_file) && file_exists($phpbbgallery_core_file_source) && is_writable($phpbbgallery_core_file_source) && file_exists($phpbbgallery_core_file_medium) && is_writable($phpbbgallery_core_file_medium) && file_exists($phpbbgallery_core_file_mini) && is_writable($phpbbgallery_core_file_mini))
592 587
 		{
593 588
 			return true;
594
-		}
595
-		else
589
+		} else
596 590
 		{
597 591
 			return false;
598 592
 		}
Please login to merge, or discard this patch.
core/controller/search.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 		$this->language->add_lang(array('gallery'), 'phpbbgallery/core');
166 166
 		$this->language->add_lang('search');
167 167
 		/**
168
-		* Build the sort options
169
-		*/
168
+		 * Build the sort options
169
+		 */
170 170
 		$limit_days = array(0 => $this->language->lang('ALL_IMAGES'), 1 => $this->language->lang('1_DAY'), 7 => $this->language->lang('7_DAYS'), 14 => $this->language->lang('2_WEEKS'), 30 => $this->language->lang('1_MONTH'), 90 => $this->language->lang('3_MONTHS'), 180 => $this->language->lang('6_MONTHS'), 365 => $this->language->lang('1_YEAR'));
171 171
 		$sort_by_text = array('t' => $this->language->lang('TIME'), 'n' => $this->language->lang('IMAGE_NAME'), 'u' => $this->language->lang('SORT_USERNAME'), 'vc' => $this->language->lang('GALLERY_VIEWS'));
172 172
 		$sort_by_sql = array('t' => 'image_time', 'n' => 'image_name_clean', 'u' => 'image_username_clean', 'vc' => 'image_view_count');
@@ -369,11 +369,11 @@  discard block
 block discarded – undo
369 369
 	}
370 370
 
371 371
 	/**
372
-	* Index Controller
373
-	*	Route: gallery/search/random
374
-	*
375
-	* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
376
-	*/
372
+	 * Index Controller
373
+	 *	Route: gallery/search/random
374
+	 *
375
+	 * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
376
+	 */
377 377
 	public function random()
378 378
 	{
379 379
 		$this->language->add_lang(array('gallery'), 'phpbbgallery/core');
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -232,8 +232,7 @@  discard block
 block discarded – undo
232 232
 				if ($search_terms == 'all')
233 233
 				{
234 234
 					$keywords .= ' ' . $add_keywords;
235
-				}
236
-				else
235
+				} else
237 236
 				{
238 237
 					$search_terms = 'all';
239 238
 					$keywords = preg_replace('#\s+#u', ' |', $keywords) . ' ' .$add_keywords;
@@ -271,8 +270,7 @@  discard block
 block discarded – undo
271 270
 			if (empty($search_album))
272 271
 			{
273 272
 				$sql_where[] = $this->db->sql_in_set('i.image_album_id', $this->gallery_auth->acl_album_ids('i_view'));
274
-			}
275
-			else
273
+			} else
276 274
 			{
277 275
 				$sql_where[] = $this->db->sql_in_set('i.image_album_id', $search_album);
278 276
 			}
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -141,24 +141,24 @@  discard block
 block discarded – undo
141 141
 
142 142
 	public function base($page = 1)
143 143
 	{
144
-		$search_id		= $this->request->variable('search_id', '');
144
+		$search_id = $this->request->variable('search_id', '');
145 145
 		$image_id		= $this->request->variable('image_id', 0);
146 146
 
147
-		$submit			= $this->request->variable('submit', false);
147
+		$submit = $this->request->variable('submit', false);
148 148
 		$keywords		= utf8_normalize_nfc($this->request->variable('keywords', '', true));
149 149
 		$add_keywords	= utf8_normalize_nfc($this->request->variable('add_keywords', '', true));
150 150
 		$username		= $this->request->variable('username', '', true);
151
-		$user_id		= $this->request->variable('user_id', array(0));
151
+		$user_id = $this->request->variable('user_id', array(0));
152 152
 		$search_terms	= $this->request->variable('terms', 'all');
153 153
 		$search_album	= $this->request->variable('aid', array(0));
154 154
 		$search_child	= $this->request->variable('sc', true);
155
-		$search_fields	= $this->request->variable('sf', 'all');
156
-		$sort_days		= $this->request->variable('st', 0);
155
+		$search_fields = $this->request->variable('sf', 'all');
156
+		$sort_days = $this->request->variable('st', 0);
157 157
 		$sort_key		= $this->request->variable('sk', 't');
158 158
 		$sort_dir		= $this->request->variable('sd', 'd');
159 159
 		$filtered		= $this->request->variable('filtered', false);
160 160
 
161
-		$start 			= ($page - 1) * $this->gallery_config->get('items_per_page');
161
+		$start = ($page - 1) * $this->gallery_config->get('items_per_page');
162 162
 		if ($filtered)
163 163
 		{
164 164
 			$submit = true;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		if ($this->gallery_config->get('allow_rates'))
176 176
 		{
177 177
 			$sort_by_text['ra'] = $this->language->lang('RATING');
178
-			$sort_by_sql['ra'] = 'image_rate_points';//@todo: (phpbb_gallery_contest::$mode == phpbb_gallery_contest::MODE_SUM) ? 'image_rate_points' : 'image_rate_avg';
178
+			$sort_by_sql['ra'] = 'image_rate_points'; //@todo: (phpbb_gallery_contest::$mode == phpbb_gallery_contest::MODE_SUM) ? 'image_rate_points' : 'image_rate_avg';
179 179
 			$sort_by_text['r'] = $this->language->lang('RATES_COUNT');
180 180
 			$sort_by_sql['r'] = 'image_rates';
181 181
 		}
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 				{
207 207
 					trigger_error(sprintf($this->language->lang('TOO_FEW_AUTHOR_CHARS'), $this->config['min_search_author_chars']));
208 208
 				}
209
-				$username_parsed = (strpos($username, '*') !== false) ? ' username_clean ' . $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), utf8_clean_string($this->db->sql_escape($username)))) : ' username_clean = \'' . $this->db->sql_escape(utf8_clean_string($username)) .'\'';
209
+				$username_parsed = (strpos($username, '*') !== false) ? ' username_clean ' . $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), utf8_clean_string($this->db->sql_escape($username)))) : ' username_clean = \'' . $this->db->sql_escape(utf8_clean_string($username)) . '\'';
210 210
 				$sql = 'SELECT user_id
211 211
 					FROM ' . USERS_TABLE . '
212 212
 					WHERE ' . $username_parsed . '
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
 			if (!empty($user_id))
226 226
 			{
227
-				$sql_where[] =  $this->db->sql_in_set('i.image_user_id', $user_id);
227
+				$sql_where[] = $this->db->sql_in_set('i.image_user_id', $user_id);
228 228
 			}
229 229
 			// if we search in an existing search result just add the additional keywords. But we need to use "all search terms"-mode
230 230
 			// so we can keep the old keywords in their old mode, but add the new ones as required words
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 				else
238 238
 				{
239 239
 					$search_terms = 'all';
240
-					$keywords = preg_replace('#\s+#u', ' |', $keywords) . ' ' .$add_keywords;
240
+					$keywords = preg_replace('#\s+#u', ' |', $keywords) . ' ' . $add_keywords;
241 241
 				}
242 242
 			}
243 243
 			$keywords_ary = ($keywords) ? explode(' ', $keywords) : array();
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 				$match_search_query = '';
263 263
 				foreach ($matches as $match)
264 264
 				{
265
-					$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER('. $match . ') ';
265
+					$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER(' . $match . ') ';
266 266
 					$match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char() . mb_strtolower($word) . $this->db->get_any_char()));
267 267
 				}
268 268
 				$search_query .= ((!$search_query) ? '' : (($search_terms == 'all') ? ' AND ' : ' OR ')) . '(' . $match_search_query . ')';
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 				trigger_error('NO_SEARCH_RESULTS');
292 292
 			}
293 293
 			$sql_array['SELECT'] = '*, a.album_name, a.album_status, a.album_user_id, a.album_id';
294
-			$sql_array['LEFT_JOIN']	= array(
294
+			$sql_array['LEFT_JOIN'] = array(
295 295
 				array(
296 296
 					'FROM'		=> array($this->albums_table => 'a'),
297 297
 					'ON'		=> 'a.album_id = i.image_album_id',
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 			{
320 320
 				$this->image->assign_block('imageblock.image', $row, $show_options, $thumbnail_link, $imagename_link);
321 321
 			}
322
-			$current_page = $page*$this->gallery_config->get('items_per_page');
322
+			$current_page = $page * $this->gallery_config->get('items_per_page');
323 323
 			$this->pagination->generate_template_pagination(array(
324 324
 				'routes' => array(
325 325
 					'phpbbgallery_core_search',
Please login to merge, or discard this patch.
core/controller/index.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -111,11 +111,11 @@
 block discarded – undo
111 111
 	}
112 112
 
113 113
 	/**
114
-	* Index Controller
115
-	*	Route: gallery
116
-	*
117
-	* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
118
-	*/
114
+	 * Index Controller
115
+	 *	Route: gallery
116
+	 *
117
+	 * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
118
+	 */
119 119
 	public function base()
120 120
 	{
121 121
 		// Display login box for guests and an error for users
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -131,8 +131,7 @@  discard block
 block discarded – undo
131 131
 		if ($this->gallery_config->get('pegas_index_album'))
132 132
 		{
133 133
 			$this->display->display_albums('personal', $this->config['load_moderators']);
134
-		}
135
-		else
134
+		} else
136 135
 		{
137 136
 			$last_image = $this->image->get_last_image();
138 137
 			if (empty($last_image))
@@ -347,8 +346,7 @@  discard block
 block discarded – undo
347 346
 				FROM ' . GROUPS_TABLE . '
348 347
 				WHERE group_legend > 0
349 348
 				ORDER BY ' . $order_legend . ' ASC';
350
-		}
351
-		else
349
+		} else
352 350
 		{
353 351
 			$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type, g.group_legend
354 352
 				FROM ' . GROUPS_TABLE . ' g
@@ -373,8 +371,7 @@  discard block
 block discarded – undo
373 371
 			if ($row['group_name'] == 'BOTS' || ($this->user->data['user_id'] != ANONYMOUS && !$this->auth->acl_get('u_viewprofile')))
374 372
 			{
375 373
 				$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
376
-			}
377
-			else
374
+			} else
378 375
 			{
379 376
 				$legend[] = '<a' . $colour_text . ' href="' . append_sid($this->root_path . 'memberlist.' . $this->php_ext, 'mode=group&amp;g=' . $row['group_id']) . '">' . $group_name . '</a>';
380 377
 			}
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 				'U_IMAGENAME'	=> ($last_image['image_id'] > 0) ? $last_image['image_name'] : false,
168 168
 				'U_IMAGE_ACTION'	=> $action_image,
169 169
 				'U_IMAGENAME_ACTION'	=> $this->helper->route('phpbbgallery_core_image', array('image_id' => $last_image['image_id'])),
170
-				'U_TIME'	=> ($last_image['image_id'] > 0) ?  $this->user->format_date($last_image['image_time']) : false,
170
+				'U_TIME'	=> ($last_image['image_id'] > 0) ? $this->user->format_date($last_image['image_time']) : false,
171 171
 				'U_UPLOADER'	=> ($last_image['image_id'] > 0) ? get_username_string('full', $last_image['image_user_id'], $last_image['image_username'], $last_image['image_user_colour']) : false,
172 172
 				'ALPHABET_NAVIGATION' => implode('&nbsp;', $alpha_links),
173 173
 			));
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 			'TOTAL_IMAGES'		=> ($this->gallery_config->get('disp_statistic')) ? $this->language->lang('TOTAL_IMAGES_SPRINTF', $this->gallery_config->get('num_images')) : '',
328 328
 			'TOTAL_COMMENTS'	=> ($this->gallery_config->get('allow_comments')) ? $this->language->lang('TOTAL_COMMENTS_SPRINTF', $this->gallery_config->get('num_comments')) : '',
329 329
 			'TOTAL_PGALLERIES'	=> ($this->gallery_auth->acl_check('a_list', \phpbbgallery\core\auth\auth::PERSONAL_ALBUM)) ? $this->language->lang('TOTAL_PEGAS_SPRINTF', $this->gallery_config->get('num_pegas')) : '',
330
-			'NEWEST_PGALLERIES'	=> ($this->gallery_config->get('num_pegas')) ? sprintf($this->language->lang('NEWEST_PGALLERY'), '<a href="' . $this->helper->route('phpbbgallery_core_album', array('album_id' => $this->gallery_config->get('newest_pega_album_id'))) . '" '. ($this->gallery_config->get('newest_pega_user_colour') ? 'class="username-coloured" style="color: #' . $this->gallery_config->get('newest_pega_user_colour') . ';"' : 'class="username"') . '>' . $this->gallery_config->get('newest_pega_username') . '</a>') : '',
330
+			'NEWEST_PGALLERIES'	=> ($this->gallery_config->get('num_pegas')) ? sprintf($this->language->lang('NEWEST_PGALLERY'), '<a href="' . $this->helper->route('phpbbgallery_core_album', array('album_id' => $this->gallery_config->get('newest_pega_album_id'))) . '" ' . ($this->gallery_config->get('newest_pega_user_colour') ? 'class="username-coloured" style="color: #' . $this->gallery_config->get('newest_pega_user_colour') . ';"' : 'class="username"') . '>' . $this->gallery_config->get('newest_pega_username') . '</a>') : '',
331 331
 		));
332 332
 
333 333
 		$this->template->assign_vars(array(
@@ -425,9 +425,9 @@  discard block
 block discarded – undo
425 425
 
426 426
 			while ($row = $this->db->sql_fetchrow($result))
427 427
 			{
428
-				$birthday_username	= get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
429
-				$birthday_year		= (int) substr($row['user_birthday'], -4);
430
-				$birthday_age		= ($birthday_year) ? max(0, $now['year'] - $birthday_year) : '';
428
+				$birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
429
+				$birthday_year = (int) substr($row['user_birthday'], -4);
430
+				$birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : '';
431 431
 
432 432
 				$this->template->assign_block_vars('birthdays', array(
433 433
 					'USERNAME'	=> $birthday_username,
Please login to merge, or discard this patch.
core/controller/comment.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -825,8 +825,8 @@
 block discarded – undo
825 825
 		generate_smilies('inline', 0);
826 826
 
827 827
 		/**
828
-		* Rating-System: now you can comment and rate in one form
829
-		*/
828
+		 * Rating-System: now you can comment and rate in one form
829
+		 */
830 830
 		$s_user_rated = false;
831 831
 		if ($this->gallery_config->get('allow_rates'))
832 832
 		{
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 			include_once($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext);
198 198
 		}
199 199
 
200
-		$bbcode_status	= ($this->config['allow_bbcode']) ? true : false;
201
-		$smilies_status	= ($this->config['allow_smilies']) ? true : false;
200
+		$bbcode_status = ($this->config['allow_bbcode']) ? true : false;
201
+		$smilies_status = ($this->config['allow_smilies']) ? true : false;
202 202
 		$img_status		= ($bbcode_status) ? true : false;
203 203
 		$url_status		= ($this->config['allow_post_links']) ? true : false;
204 204
 		$flash_status	= false;
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 			}
306 306
 
307 307
 			$message_parser = new \parse_message();
308
-			$message_parser->message	= utf8_normalize_nfc($comment_plain);
308
+			$message_parser->message = utf8_normalize_nfc($comment_plain);
309 309
 			if ($message_parser->message)
310 310
 			{
311 311
 				$message_parser->parse(true, true, true, true, false, true, true, true);
@@ -464,8 +464,8 @@  discard block
 block discarded – undo
464 464
 			include_once($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext);
465 465
 		}
466 466
 
467
-		$bbcode_status	= ($this->config['allow_bbcode']) ? true : false;
468
-		$smilies_status	= ($this->config['allow_smilies']) ? true : false;
467
+		$bbcode_status = ($this->config['allow_bbcode']) ? true : false;
468
+		$smilies_status = ($this->config['allow_smilies']) ? true : false;
469 469
 		$img_status		= ($bbcode_status) ? true : false;
470 470
 		$url_status		= ($this->config['allow_post_links']) ? true : false;
471 471
 		$flash_status	= false;
@@ -678,8 +678,8 @@  discard block
 block discarded – undo
678 678
 			include_once($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext);
679 679
 		}
680 680
 
681
-		$bbcode_status	= ($this->config['allow_bbcode']) ? true : false;
682
-		$smilies_status	= ($this->config['allow_smilies']) ? true : false;
681
+		$bbcode_status = ($this->config['allow_bbcode']) ? true : false;
682
+		$smilies_status = ($this->config['allow_smilies']) ? true : false;
683 683
 		$img_status		= ($bbcode_status) ? true : false;
684 684
 		$url_status		= ($this->config['allow_post_links']) ? true : false;
685 685
 		$flash_status	= false;
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 			'IMAGE_NAME'			=> $image_data['image_name'],
760 760
 
761 761
 			'S_SIGNATURE_CHECKED'	=> (isset($sig_checked) && $sig_checked) ? ' checked="checked"' : '',
762
-			'S_ALBUM_ACTION'		=> append_sid($this->url->path('full') . 'comment/' . (int) $image_id . '/edit/'. (int) $comment_id),
762
+			'S_ALBUM_ACTION'		=> append_sid($this->url->path('full') . 'comment/' . (int) $image_id . '/edit/' . (int) $comment_id),
763 763
 		));
764 764
 
765 765
 		if ($submit && !$error)
@@ -808,8 +808,8 @@  discard block
 block discarded – undo
808 808
 			include_once($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext);
809 809
 		}
810 810
 
811
-		$bbcode_status	= ($this->config['allow_bbcode']) ? true : false;
812
-		$smilies_status	= ($this->config['allow_smilies']) ? true : false;
811
+		$bbcode_status = ($this->config['allow_bbcode']) ? true : false;
812
+		$smilies_status = ($this->config['allow_smilies']) ? true : false;
813 813
 		$img_status		= ($bbcode_status) ? true : false;
814 814
 		$url_status		= ($this->config['allow_post_links']) ? true : false;
815 815
 		$flash_status	= false;
Please login to merge, or discard this patch.
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -213,8 +213,7 @@  discard block
 block discarded – undo
213 213
 		if (isset($album_data['contest_start']))
214 214
 		{
215 215
 			$s_hide_comment_input = (time() < ($album_data['contest_start'] + $album_data['contest_end'])) ? true : false;
216
-		}
217
-		else
216
+		} else
218 217
 		{
219 218
 			$s_hide_comment_input = false;
220 219
 		}
@@ -338,14 +337,12 @@  discard block
 block discarded – undo
338 337
 				$this->notification_helper->notify('new_comment', $data);
339 338
 				//$phpbb_gallery_notification->send_notification('image', $image_id, $image_data['image_name']);
340 339
 				$message .= $this->language->lang('COMMENT_STORED') . '<br />';
341
-			}
342
-			else if ($this->misc->display_captcha('comment'))
340
+			} else if ($this->misc->display_captcha('comment'))
343 341
 			{
344 342
 				$s_captcha_hidden_fields = ($captcha->is_solved()) ? build_hidden_fields($captcha->get_hidden_fields()) : '';
345 343
 			}
346 344
 			$sig_checked = ($this->auth->acl_get('u_sig') && isset($_POST['attach_sig']));
347
-		}
348
-		else
345
+		} else
349 346
 		{
350 347
 			if ($comment_id != 0)
351 348
 			{
@@ -439,8 +436,7 @@  discard block
 block discarded – undo
439 436
 			$comment_data = $this->db->sql_fetchrow($result);
440 437
 			$this->db->sql_freeresult($result);
441 438
 			$image_id = (int) $comment_data['comment_image_id'];
442
-		}
443
-		else
439
+		} else
444 440
 		{
445 441
 			$this->misc->not_authorised($image_backlink, $image_loginlink);
446 442
 		}
@@ -451,8 +447,7 @@  discard block
 block discarded – undo
451 447
 			{
452 448
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
453 449
 			}
454
-		}
455
-		else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id']))
450
+		} else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id']))
456 451
 		{
457 452
 			$this->misc->not_authorised($image_backlink, $image_loginlink);
458 453
 		}
@@ -485,8 +480,7 @@  discard block
 block discarded – undo
485 480
 		if (isset($album_data['contest_start']))
486 481
 		{
487 482
 			$s_hide_comment_input = (time() < ($album_data['contest_start'] + $album_data['contest_end'])) ? true : false;
488
-		}
489
-		else
483
+		} else
490 484
 		{
491 485
 			$s_hide_comment_input = false;
492 486
 		}
@@ -578,8 +572,7 @@  discard block
 block discarded – undo
578 572
 					$this->gallery_log->add_log('moderator', 'c_edit', $image_data['image_album_id'], $image_data['image_id'], array('LOG_GALLERY_COMMENT_EDITED', $image_data['image_name']));
579 573
 				}
580 574
 			}
581
-		}
582
-		else
575
+		} else
583 576
 		{
584 577
 			$sig_checked = (bool) $comment_data['comment_signature'];
585 578
 
@@ -653,8 +646,7 @@  discard block
 block discarded – undo
653 646
 			$comment_data = $this->db->sql_fetchrow($result);
654 647
 			$this->db->sql_freeresult($result);
655 648
 			$image_id = (int) $comment_data['comment_image_id'];
656
-		}
657
-		else
649
+		} else
658 650
 		{
659 651
 			$this->misc->not_authorised($image_backlink, $image_loginlink);
660 652
 		}
@@ -665,8 +657,7 @@  discard block
 block discarded – undo
665 657
 			{
666 658
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
667 659
 			}
668
-		}
669
-		else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id']))
660
+		} else if (($comment_data['comment_user_id'] != $this->user->data['user_id']) && !$this->gallery_auth->acl_check('m_comments', $album_id, $album_data['album_user_id']))
670 661
 		{
671 662
 			$this->misc->not_authorised($image_backlink, $image_loginlink);
672 663
 		}
@@ -731,15 +722,13 @@  discard block
 block discarded – undo
731 722
 
732 723
 			$message = $this->language->lang('DELETED_COMMENT') . '<br />';
733 724
 			$submit = true;
734
-		}
735
-		else
725
+		} else
736 726
 		{
737 727
 			if (isset($_POST['cancel']))
738 728
 			{
739 729
 				$message = $this->language->lang('DELETED_COMMENT_NOT') . '<br />';
740 730
 				$submit = true;
741
-			}
742
-			else
731
+			} else
743 732
 			{
744 733
 				confirm_box(false, 'DELETE_COMMENT2', $s_hidden_fields);
745 734
 			}
Please login to merge, or discard this patch.
core/migrations/release_1_2_0_add_bbcode.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 				{
54 54
 					$bbcode_id = NUM_CORE_BBCODES + 1;
55 55
 				}
56
-			}
57
-			else
56
+			} else
58 57
 			{
59 58
 				$bbcode_id = NUM_CORE_BBCODES + 1;
60 59
 			}
@@ -63,8 +62,7 @@  discard block
 block discarded – undo
63 62
 			if ($this->config['enable_mod_rewrite'])
64 63
 			{
65 64
 				$url .= 'gallery/image/';
66
-			}
67
-			else
65
+			} else
68 66
 			{
69 67
 				$url .= 'app.php/gallery/image/';
70 68
 			}
Please login to merge, or discard this patch.
core/migrations/release_1_2_0.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,8 +118,7 @@
 block discarded – undo
118 118
 			if (isset(self::$is_dynamic[$name]))
119 119
 			{
120 120
 				$config->set('phpbb_gallery_' . $name, $value, true);
121
-			}
122
-			else
121
+			} else
123 122
 			{
124 123
 				$config->set('phpbb_gallery_' . $name, $value);
125 124
 			}
Please login to merge, or discard this patch.
core/migrations/release_1_2_0_create_filesystem.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@
 block discarded – undo
89 89
 			if (is_dir($file))
90 90
 			{
91 91
 				$this->recursiveRemoveDirectory($file);
92
-			}
93
-			else
92
+			} else
94 93
 			{
95 94
 				unlink($file);
96 95
 			}
Please login to merge, or discard this patch.
core/ext.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
 		'phpbbgallery/acpcleanup',
15 15
 	);
16 16
 	/**
17
-	* Single enable step that installs any included migrations
18
-	*
19
-	* @param mixed $old_state State returned by previous call of this method
20
-	* @return mixed Returns false after last step, otherwise temporary state
21
-	*/
17
+	 * Single enable step that installs any included migrations
18
+	 *
19
+	 * @param mixed $old_state State returned by previous call of this method
20
+	 * @return mixed Returns false after last step, otherwise temporary state
21
+	 */
22 22
 	function enable_step($old_state)
23 23
 	{
24 24
 		switch ($old_state)
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	/**
55
-	* Single disable step that does nothing
56
-	*
57
-	* @param mixed $old_state State returned by previous call of this method
58
-	* @return mixed Returns false after last step, otherwise temporary state
59
-	*/
55
+	 * Single disable step that does nothing
56
+	 *
57
+	 * @param mixed $old_state State returned by previous call of this method
58
+	 * @return mixed Returns false after last step, otherwise temporary state
59
+	 */
60 60
 	function disable_step($old_state)
61 61
 	{
62 62
 		switch ($old_state)
@@ -87,21 +87,21 @@  discard block
 block discarded – undo
87 87
 	}
88 88
 
89 89
 	/**
90
-	* Single purge step that reverts any included and installed migrations
91
-	*
92
-	* @param mixed $old_state State returned by previous call of this method
93
-	* @return mixed Returns false after last step, otherwise temporary state
94
-	*/
90
+	 * Single purge step that reverts any included and installed migrations
91
+	 *
92
+	 * @param mixed $old_state State returned by previous call of this method
93
+	 * @return mixed Returns false after last step, otherwise temporary state
94
+	 */
95 95
 	function purge_step($old_state)
96 96
 	{
97 97
 		switch ($old_state)
98 98
 		{
99 99
 			case '': // Empty means nothing has run yet
100 100
 				/**
101
-				* @todo Remove this try/catch condition once purge_notifications is fixed
102
-				* in the core to work with disabled extensions without fatal errors.
103
-				* https://tracker.phpbb.com/browse/PHPBB3-12435
104
-				*/
101
+				 * @todo Remove this try/catch condition once purge_notifications is fixed
102
+				 * in the core to work with disabled extensions without fatal errors.
103
+				 * https://tracker.phpbb.com/browse/PHPBB3-12435
104
+				 */
105 105
 				try
106 106
 				{
107 107
 					// Purge board rules notifications
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,8 +111,7 @@
 block discarded – undo
111 111
 					$phpbb_notifications->purge_notifications('phpbbgallery.core.notification.new_image');
112 112
 					$phpbb_notifications->purge_notifications('phpbbgallery.core.notification.new_comment');
113 113
 					$phpbb_notifications->purge_notifications('phpbbgallery.core.notification.new_report');
114
-				}
115
-				catch (\phpbb\notification\exception $e)
114
+				} catch (\phpbb\notification\exception $e)
116 115
 				{
117 116
 					// continue
118 117
 				}
Please login to merge, or discard this patch.