Passed
Push — master ( dc57d3...fc9673 )
by Stanislav
02:41
created
core/block.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 	 *
24 24
 	 * Constants defining some album properties
25 25
 	 */
26
-	const PUBLIC_ALBUM		= 0;
26
+	const PUBLIC_ALBUM = 0;
27 27
 
28
-	const TYPE_CAT			= 0;
29
-	const TYPE_UPLOAD		= 1;
28
+	const TYPE_CAT = 0;
29
+	const TYPE_UPLOAD = 1;
30 30
 	const TYPE_CONTEST		= 2;
31 31
 
32
-	const ALBUM_OPEN		= 0;
32
+	const ALBUM_OPEN = 0;
33 33
 	const ALBUM_LOCKED		= 1;
34 34
 
35 35
 	/**
@@ -58,22 +58,22 @@  discard block
 block discarded – undo
58 58
 	/**
59 59
 	 * Only visible for moderators.
60 60
 	 */
61
-	const STATUS_UNAPPROVED	= 0;
61
+	const STATUS_UNAPPROVED = 0;
62 62
 
63 63
 	/**
64 64
 	 * Visible for everyone with the i_view-permissions
65 65
 	 */
66
-	const STATUS_APPROVED	= 1;
66
+	const STATUS_APPROVED = 1;
67 67
 
68 68
 	/**
69 69
 	 * Visible for everyone with the i_view-permissions, but only moderators can comment.
70 70
 	 */
71
-	const STATUS_LOCKED		= 2;
71
+	const STATUS_LOCKED = 2;
72 72
 
73 73
 	/**
74 74
 	 * Orphan files are only visible for their author, because they're not yet ready uploaded.
75 75
 	 */
76
-	const STATUS_ORPHAN		= 3;
76
+	const STATUS_ORPHAN = 3;
77 77
 
78 78
 	/**
79 79
 	 * Constants regarding the image contest relation
Please login to merge, or discard this patch.
core/controller/file.php 1 patch
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.
core/controller/moderate.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		$approve_ary = $this->request->variable('approval', array('' => array(0)));
194 194
 		$action_ary = $this->request->variable('action', array('' => 0));
195 195
 		$back_link = $this->request->variable('back_link', $album_id > 0 ? $this->helper->route('phpbbgallery_core_moderate_queue_approve_album', array('album_id' => $album_id)) : $this->helper->route('phpbbgallery_core_moderate_queue_approve'));
196
-		list($action, ) = each($action_ary);
196
+		list($action,) = each($action_ary);
197 197
 
198 198
 		$this->language->add_lang(array('gallery_mcp', 'gallery'), 'phpbbgallery/core');
199 199
 		$this->language->add_lang('mcp');
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 			}
257 257
 			else
258 258
 			{
259
-				$s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />';
259
+				$s_hidden_fields = '<input type="hidden" name="action[' . $action . ']" value="' . $action . '" />';
260 260
 				$s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />';
261 261
 				foreach ($approve_ary as $id => $var)
262 262
 				{
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 		$report_ary = $this->request->variable('report', array(0));
339 339
 		$action_ary = $this->request->variable('action', array('' => 0));
340 340
 		$back_link = $this->request->variable('back_link', $album_id > 0 ? $this->helper->route('phpbbgallery_core_moderate_reports_album', array('album_id' => $album_id)) : $this->helper->route('phpbbgallery_core_moderate_reports'));
341
-		list($action, ) = each($action_ary);
341
+		list($action,) = each($action_ary);
342 342
 
343 343
 		$this->language->add_lang(array('gallery_mcp', 'gallery'), 'phpbbgallery/core');
344 344
 		$this->language->add_lang('mcp');
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 			}
355 355
 			else
356 356
 			{
357
-				$s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />';
357
+				$s_hidden_fields = '<input type="hidden" name="action[' . $action . ']" value="' . $action . '" />';
358 358
 				$s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />';
359 359
 				foreach ($report_ary as $var)
360 360
 				{
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
 			case 'reports_close':
577 577
 				if (confirm_box(true))
578 578
 				{
579
-					$back_link =  $this->helper->route('phpbbgallery_core_moderate_image', array('image_id' => $image_id));
579
+					$back_link = $this->helper->route('phpbbgallery_core_moderate_image', array('image_id' => $image_id));
580 580
 					$this->report->close_reports_by_image($image_id);
581 581
 					$message = $this->language->lang('WAITING_REPORTED_DONE', 1);
582 582
 					$this->url->meta_refresh(3, $back_link);
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
 				'REPORT_TIME'	=> $this->user->format_date($var['report_time']),
673 673
 				'REPORT_NOTE'	=> $var['report_note'],
674 674
 				'STATUS'		=> $var['report_status'],
675
-				'MANAGER'		=> $var['report_manager'] != 0 ?  $this->user_loader->get_username($var['report_manager'], 'full') : false,
675
+				'MANAGER'		=> $var['report_manager'] != 0 ? $this->user_loader->get_username($var['report_manager'], 'full') : false,
676 676
 			));
677 677
 		}
678 678
 		return $this->helper->render('gallery/moderate_image_overview.html', $this->language->lang('GALLERY'));
@@ -797,7 +797,7 @@  discard block
 block discarded – undo
797 797
 		$image_data = $this->image->get_image_data($image_id);
798 798
 		$album_id = $image_data['image_album_id'];
799 799
 		//$user_id = $image_data['image_user_id'];
800
-		$album_data =  $this->album->get_info($album_id);
800
+		$album_data = $this->album->get_info($album_id);
801 801
 		$album_backlink = $this->helper->route('phpbbgallery_core_album', array('album_id' => $album_id));
802 802
 		$image_backlink = $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id));
803 803
 		$album_loginlink = append_sid($this->root_path . 'ucp.' . $this->php_ext . '?mode=login');
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
 		$image_data = $this->image->get_image_data($image_id);
846 846
 		$album_id = $image_data['image_album_id'];
847 847
 		//$user_id = $image_data['image_user_id'];
848
-		$album_data =  $this->album->get_info($album_id);
848
+		$album_data = $this->album->get_info($album_id);
849 849
 		$album_backlink = $this->helper->route('phpbbgallery_core_album', array('album_id' => $album_id));
850 850
 		$image_backlink = $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id));
851 851
 		$album_loginlink = append_sid($this->root_path . 'ucp.' . $this->php_ext . '?mode=login');
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
 			$image_id_ary = array($image_id);
862 862
 			$this->image->lock_images($image_id_ary, $album_data['album_id']);
863 863
 			// To DO - add notification
864
-			$message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE',1));
864
+			$message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE', 1));
865 865
 			meta_refresh($meta_refresh_time, $image_backlink);
866 866
 			trigger_error($message);
867 867
 		}
Please login to merge, or discard this patch.
core/controller/album.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
 	 * @param string                                                    $images_table Gallery image table
73 73
 	 */
74 74
 	public function __construct(\phpbb\config\config $config, \phpbb\controller\helper $helper,
75
-								\phpbb\db\driver\driver_interface $db,	\phpbb\pagination $pagination,
75
+								\phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination,
76 76
 								\phpbb\template\template $template, \phpbb\user $user, \phpbb\language\language $language,
77 77
 								\phpbbgallery\core\album\display $display, \phpbbgallery\core\album\loader $loader,
78 78
 								\phpbbgallery\core\auth\auth $auth, \phpbbgallery\core\auth\level $auth_level,
79
-								\phpbbgallery\core\config $gallery_config,\phpbbgallery\core\notification\helper $notifications_helper,
79
+								\phpbbgallery\core\config $gallery_config, \phpbbgallery\core\notification\helper $notifications_helper,
80 80
 								\phpbbgallery\core\url $url, \phpbbgallery\core\image\image $image, \phpbb\request\request $request,
81 81
 								\phpbbgallery\core\contest $contest,
82 82
 								$images_table)
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	 */
222 222
 	protected function display_images($album_id, $album_data, $start, $limit)
223 223
 	{
224
-		$sort_days	= $this->request->variable('st', 0);
224
+		$sort_days = $this->request->variable('st', 0);
225 225
 		$sort_key	= $this->request->variable('sk', ($album_data['album_sort_key']) ? $album_data['album_sort_key'] : $this->config['phpbb_gallery_default_sort_key']);
226 226
 		$sort_dir	= $this->request->variable('sd', ($album_data['album_sort_dir']) ? $album_data['album_sort_dir'] : $this->config['phpbb_gallery_default_sort_dir']);
227 227
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 			$album_user_id = $image_data['album_user_id'];
345 345
 
346 346
 			//@todo: $rating = new phpbb_gallery_image_rating($image_data['image_id'], $image_data, $image_data);
347
-			$image_data['rating'] = '0';//@todo: $rating->get_image_rating(false, false);
347
+			$image_data['rating'] = '0'; //@todo: $rating->get_image_rating(false, false);
348 348
 			//@todo: unset($rating);
349 349
 
350 350
 			$s_user_allowed = (($image_data['image_user_id'] == $this->user->data['user_id']) && ($album_status != \phpbbgallery\core\block::ALBUM_LOCKED));
@@ -402,14 +402,14 @@  discard block
 block discarded – undo
402 402
 
403 403
 				'U_USER_IP'		=> $show_ip && $this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id) ? $image_data['image_user_ip'] : false,
404 404
 				'S_IMAGE_REPORTED'		=> $image_data['image_reported'],
405
-				'U_IMAGE_REPORTED'		=> '',//($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_reported']) : '',
405
+				'U_IMAGE_REPORTED'		=> '', //($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_reported']) : '',
406 406
 				'S_STATUS_APPROVED'		=> ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED),
407 407
 				'S_STATUS_UNAPPROVED'	=> ($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id) && $image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? true : false,
408 408
 				'S_STATUS_UNAPPROVED_ACTION'	=> ($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id) && $image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->helper->route('phpbbgallery_core_moderate_image_approve', array('image_id' => $image_data['image_id'])) : '',
409 409
 				'S_STATUS_LOCKED'		=> ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_LOCKED),
410 410
 
411 411
 				'U_REPORT'	=> ($this->auth->acl_check('m_report', $image_data['image_album_id'], $album_user_id) && $image_data['image_reported']) ? '123'/*$this->url->append_sid('mcp', "mode=report_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_reported'])*/ : '',
412
-				'U_STATUS'	=> '',//($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_id']) : '',
412
+				'U_STATUS'	=> '', //($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&amp;album_id={$image_data['image_album_id']}&amp;option_id=" . $image_data['image_id']) : '',
413 413
 				'L_STATUS'	=> ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->language->lang('APPROVE_IMAGE') : (($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED) ? $this->language->lang('CHANGE_IMAGE_STATUS') : $this->language->lang('UNLOCK_IMAGE')),
414 414
 
415 415
 				'S_CONTEST_RANK'	=> $image_data['image_contest_rank'],
Please login to merge, or discard this patch.
core/controller/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 				'U_IMAGENAME'	=> ($last_image['image_id'] > 0) ? $last_image['image_name'] : false,
160 160
 				'U_IMAGE_ACTION'	=> $action_image,
161 161
 				'U_IMAGENAME_ACTION'	=> $this->helper->route('phpbbgallery_core_image', array('image_id' => $last_image['image_id'])),
162
-				'U_TIME'	=> ($last_image['image_id'] > 0) ?  $this->user->format_date($last_image['image_time']) : false,
162
+				'U_TIME'	=> ($last_image['image_id'] > 0) ? $this->user->format_date($last_image['image_time']) : false,
163 163
 				'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,
164 164
 			));
165 165
 			$this->gallery_user->set_user_id($this->user->data['user_id']);
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 			'TOTAL_IMAGES'		=> ($this->gallery_config->get('disp_statistic')) ? $this->language->lang('TOTAL_IMAGES_SPRINTF', $this->gallery_config->get('num_images')) : '',
319 319
 			'TOTAL_COMMENTS'	=> ($this->gallery_config->get('allow_comments')) ? $this->language->lang('TOTAL_COMMENTS_SPRINTF', $this->gallery_config->get('num_comments')) : '',
320 320
 			'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')) : '',
321
-			'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>') : '',
321
+			'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>') : '',
322 322
 		));
323 323
 
324 324
 		$this->template->assign_vars(array(
@@ -416,9 +416,9 @@  discard block
 block discarded – undo
416 416
 
417 417
 			while ($row = $this->db->sql_fetchrow($result))
418 418
 			{
419
-				$birthday_username	= get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
420
-				$birthday_year		= (int) substr($row['user_birthday'], -4);
421
-				$birthday_age		= ($birthday_year) ? max(0, $now['year'] - $birthday_year) : '';
419
+				$birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
420
+				$birthday_year = (int) substr($row['user_birthday'], -4);
421
+				$birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : '';
422 422
 
423 423
 				$this->template->assign_block_vars('birthdays', array(
424 424
 					'USERNAME'	=> $birthday_username,
Please login to merge, or discard this patch.
core/controller/comment.php 1 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.
core/moderate.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 				'IMAGE_ALBUM_ID'	=> $VAR['image_album_id'],
143 143
 			));
144 144
 			unset($album_tmp);
145
-			$waiting_images ++;
145
+			$waiting_images++;
146 146
 		}
147 147
 		$this->template->assign_vars(array(
148 148
 			'TOTAL_IMAGES_WAITING' => $this->lang->lang('WAITING_UNAPPROVED_IMAGE', (int) $count),
@@ -212,21 +212,21 @@  discard block
 block discarded – undo
212 212
 		{
213 213
 			$status[] = 0;
214 214
 			$status[] = 2;
215
-			$actions['approve']	= 'QUEUES_A_APPROVE';
216
-			$actions['unapprove']	= 'QUEUES_A_UNAPPROVE';
217
-			$actions['lock']	= 'QUEUES_A_LOCK';
215
+			$actions['approve'] = 'QUEUES_A_APPROVE';
216
+			$actions['unapprove'] = 'QUEUES_A_UNAPPROVE';
217
+			$actions['lock'] = 'QUEUES_A_LOCK';
218 218
 		}
219 219
 		if ($this->gallery_auth->acl_check('m_delete', $album['album_id'], $album['album_user_id']))
220 220
 		{
221
-			$actions['delete']	= 'QUEUES_A_DELETE';
221
+			$actions['delete'] = 'QUEUES_A_DELETE';
222 222
 		}
223 223
 		if ($this->gallery_auth->acl_check('m_move', $album['album_id'], $album['album_user_id']))
224 224
 		{
225
-			$actions['move']	= 'QUEUES_A_MOVE';
225
+			$actions['move'] = 'QUEUES_A_MOVE';
226 226
 		}
227 227
 		if ($this->gallery_auth->acl_check('m_report', $album['album_id'], $album['album_user_id']))
228 228
 		{
229
-			$actions['report']	= 'REPORT_A_CLOSE';
229
+			$actions['report'] = 'REPORT_A_CLOSE';
230 230
 		}
231 231
 		$sql = 'SELECT COUNT(DISTINCT image_id) AS count FROM ' . $this->images_table . ' WHERE ' . $this->db->sql_in_set('image_status', $status) . ' AND image_album_id = ' . (int) $album_id;
232 232
 		$result = $this->db->sql_query($sql);
Please login to merge, or discard this patch.
core/album/album.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 			throw new \phpbb\exception\http_exception(404, 'ALBUM_NOT_EXIST');
127 127
 		}
128 128
 
129
-		if ($extended_info  && !isset($row['contest_id']))
129
+		if ($extended_info && !isset($row['contest_id']))
130 130
 		{
131 131
 			$row['contest_id'] = 0;
132 132
 			$row['contest_rates_start'] = 0;
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 
340 340
 		// Get the album_user_id, so we can keep the user_colour
341 341
 		$sql = 'SELECT album_user_id
342
-			FROM ' . $this->albums_table .'
342
+			FROM ' . $this->albums_table . '
343 343
 			WHERE album_id = ' . (int) $album_id;
344 344
 		$result = $this->db->sql_query($sql);
345 345
 		$album_user_id = $this->db->sql_fetchfield('album_user_id');
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
 		// Number of not unapproved images
349 349
 		$sql = 'SELECT COUNT(image_id) images
350
-			FROM ' . $this->images_table .' 
350
+			FROM ' . $this->images_table . ' 
351 351
 			WHERE image_status <> ' . (int) $this->block->get_image_status_unapproved() . '
352 352
 				AND image_status <> ' . (int) $this->block->get_image_status_orphan() . '
353 353
 				AND image_album_id = ' . (int) $album_id;
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 
358 358
 		// Number of total images
359 359
 		$sql = 'SELECT COUNT(image_id) images_real
360
-			FROM ' . $this->images_table .'
360
+			FROM ' . $this->images_table . '
361 361
 			WHERE image_status <> ' . (int) $this->block->get_image_status_orphan() . '
362 362
 				AND image_album_id = ' . (int) $album_id;
363 363
 		$result = $this->db->sql_query($sql);
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 
367 367
 		// Data of the last not unapproved image
368 368
 		$sql = 'SELECT image_id, image_time, image_name, image_username, image_user_colour, image_user_id
369
-			FROM ' . $this->images_table .'
369
+			FROM ' . $this->images_table . '
370 370
 			WHERE image_status <> ' . (int) $this->block->get_image_status_unapproved() . '
371 371
 				AND image_status <> ' . (int) $this->block->get_image_status_orphan() . '
372 372
 				AND image_album_id = ' . (int) $album_id . '
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 		}
406 406
 		$this->db->sql_freeresult($result);
407 407
 
408
-		$sql = 'UPDATE ' . $this->albums_table .' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
408
+		$sql = 'UPDATE ' . $this->albums_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
409 409
 			WHERE album_id = ' . (int) $album_id;
410 410
 		$this->db->sql_query($sql);
411 411
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 			'album_last_username'			=> '',
436 436
 			'album_last_user_colour'		=> $user_colour,
437 437
 		);
438
-		$this->db->sql_query('INSERT INTO ' . $this->albums_table. ' ' . $this->db->sql_build_array('INSERT', $album_data));
438
+		$this->db->sql_query('INSERT INTO ' . $this->albums_table . ' ' . $this->db->sql_build_array('INSERT', $album_data));
439 439
 		$personal_album_id = $this->db->sql_nextid();
440 440
 
441 441
 		$gallery_user->update_data(array(
Please login to merge, or discard this patch.
core/album/manage.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 			}
167 167
 			else
168 168
 			{
169
-				$contest_data['contest_start'] = gmmktime((int) $m[4], (int) $m[5], 0, (int) $m[2], (int) $m[3], (int) $m[1]) - $time->getOffset();// - $offset;
169
+				$contest_data['contest_start'] = gmmktime((int) $m[4], (int) $m[5], 0, (int) $m[2], (int) $m[3], (int) $m[1]) - $time->getOffset(); // - $offset;
170 170
 			}
171 171
 			if (!preg_match('#(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{2})#', $contest_data['contest_rating'], $m))
172 172
 			{
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			}
176 176
 			else if (!$start_date_error)
177 177
 			{
178
-				$contest_data['contest_rating'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset();//- $offset;
178
+				$contest_data['contest_rating'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset(); //- $offset;
179 179
 			}
180 180
 			if (!preg_match('#(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{2})#', $contest_data['contest_end'], $m))
181 181
 			{
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 			}
185 185
 			else if (!$start_date_error)
186 186
 			{
187
-				$contest_data['contest_end'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset();//- $offset;
187
+				$contest_data['contest_end'] = gmmktime($m[4], $m[5], 0, $m[2], $m[3], $m[1]) - $contest_data['contest_start'] - $time->getOffset(); //- $offset;
188 188
 			}
189 189
 			if (!$start_date_error && !$date_error)
190 190
 			{
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
 					$album_data = $this->gallery_album->get_info($album_id);
711 711
 
712 712
 					$sql = 'UPDATE ' . $this->albums_table . ' 
713
-						SET parent_id = ' . (int) $subalbums_to_id .'
713
+						SET parent_id = ' . (int) $subalbums_to_id . '
714 714
 						WHERE parent_id = ' . (int) $album_id . '
715 715
 							AND album_user_id = ' . (int) $this->user_id;
716 716
 					$this->db->sql_query($sql);
@@ -738,13 +738,13 @@  discard block
 block discarded – undo
738 738
 		// Resync tree
739 739
 		$sql = 'UPDATE ' . $this->albums_table . '  
740 740
 			SET right_id = right_id - ' . (int) $diff . '
741
-			WHERE left_id < ' . (int) $album_data['right_id'] . ' AND right_id > ' . (int) $album_data['right_id']. '
741
+			WHERE left_id < ' . (int) $album_data['right_id'] . ' AND right_id > ' . (int) $album_data['right_id'] . '
742 742
 				AND album_user_id = ' . (int) $this->user_id;
743 743
 		$this->db->sql_query($sql);
744 744
 
745 745
 		$sql = 'UPDATE ' . $this->albums_table . ' 
746 746
 			SET left_id = left_id - ' . (int) $diff . ', right_id = right_id - ' . (int) $diff . '
747
-			WHERE left_id > ' . (int) $album_data['right_id']. '
747
+			WHERE left_id > ' . (int) $album_data['right_id'] . '
748 748
 				AND album_user_id = ' . (int) $this->user_id;
749 749
 		$this->db->sql_query($sql);
750 750
 
@@ -1037,7 +1037,7 @@  discard block
 block discarded – undo
1037 1037
 		// Now do the dirty job
1038 1038
 		$sql = 'UPDATE ' . $this->albums_table . ' 
1039 1039
 			SET left_id = left_id + CASE
1040
-				WHEN left_id BETWEEN ' . (int) $move_up_left . ' AND ' . (int) $move_up_right . ' THEN -' .(int) $diff_up . '
1040
+				WHEN left_id BETWEEN ' . (int) $move_up_left . ' AND ' . (int) $move_up_right . ' THEN -' . (int) $diff_up . '
1041 1041
 				ELSE ' .(int) $diff_down . '
1042 1042
 			END,
1043 1043
 			right_id = right_id + CASE
Please login to merge, or discard this patch.