Passed
Pull Request — master (#311)
by
unknown
03:31
created
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/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.
core/file/file.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -294,13 +294,13 @@
 block discarded – undo
294 294
 
295 295
 		if (($this->image_size['height'] / $max_height) > ($this->image_size['width'] / $max_width))
296 296
 		{
297
-			$this->thumb_height	= $max_height;
298
-			$this->thumb_width	= round($max_width * (($this->image_size['width'] / $max_width) / ($this->image_size['height'] / $max_height)));
297
+			$this->thumb_height = $max_height;
298
+			$this->thumb_width = round($max_width * (($this->image_size['width'] / $max_width) / ($this->image_size['height'] / $max_height)));
299 299
 		}
300 300
 		else
301 301
 		{
302
-			$this->thumb_height	= round($max_height * (($this->image_size['height'] / $max_height) / ($this->image_size['width'] / $max_width)));
303
-			$this->thumb_width	= $max_width;
302
+			$this->thumb_height = round($max_height * (($this->image_size['height'] / $max_height) / ($this->image_size['width'] / $max_width)));
303
+			$this->thumb_width = $max_width;
304 304
 		}
305 305
 
306 306
 		$image_copy = (($this->gd_version == self::GDLIB1) ? @imagecreate($this->thumb_width, $this->thumb_height + $additional_height) : @imagecreatetruecolor($this->thumb_width, $this->thumb_height + $additional_height));
Please login to merge, or discard this patch.
core/event/main_listener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,13 +122,13 @@
 block discarded – undo
122 122
 		}
123 123
 		if ($recent)
124 124
 		{
125
-			$block_name	= $this->language->lang('RECENT_IMAGES');
125
+			$block_name = $this->language->lang('RECENT_IMAGES');
126 126
 			$u_block = ' ';
127 127
 			$this->gallery_search->recent($this->gallery_config->get('rrc_profile_items'), -1, $event['member']['user_id'], 'rrc_profile_display', $block_name, $u_block);
128 128
 		}
129 129
 		if ($random)
130 130
 		{
131
-			$block_name	= $this->language->lang('RANDOM_IMAGES');
131
+			$block_name = $this->language->lang('RANDOM_IMAGES');
132 132
 			$u_block = ' ';
133 133
 			$this->gallery_search->random($this->gallery_config->get('rrc_profile_items'), $event['member']['user_id'], 'rrc_profile_display', $block_name, $u_block);
134 134
 		}
Please login to merge, or discard this patch.
core/comment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 			'comment_time'			=> time(),
95 95
 		);
96 96
 
97
-		$this->db->sql_query('INSERT INTO ' .$this->comments_table .' ' . $this->db->sql_build_array('INSERT', $data));
97
+		$this->db->sql_query('INSERT INTO ' . $this->comments_table . ' ' . $this->db->sql_build_array('INSERT', $data));
98 98
 		$newest_comment_id = (int) $this->db->sql_nextid();
99 99
 		$this->config->inc('num_comments', 1);
100 100
 
Please login to merge, or discard this patch.
core/auth/auth.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,21 +12,21 @@  discard block
 block discarded – undo
12 12
 
13 13
 class auth
14 14
 {
15
-	const SETTING_PERMISSIONS	= -39839;
16
-	const PERSONAL_ALBUM		= -3;
15
+	const SETTING_PERMISSIONS = -39839;
16
+	const PERSONAL_ALBUM = -3;
17 17
 	const OWN_ALBUM				= -2;
18
-	const PUBLIC_ALBUM			= 0;
18
+	const PUBLIC_ALBUM = 0;
19 19
 
20 20
 	const ACCESS_ALL			= 0;
21
-	const ACCESS_REGISTERED		= 1;
22
-	const ACCESS_NOT_FOES		= 2;
23
-	const ACCESS_FRIENDS		= 3;
24
-	const ACCESS_SPECIAL_FRIENDS	= 4;
21
+	const ACCESS_REGISTERED = 1;
22
+	const ACCESS_NOT_FOES = 2;
23
+	const ACCESS_FRIENDS = 3;
24
+	const ACCESS_SPECIAL_FRIENDS = 4;
25 25
 
26 26
 	// ACL - slightly different
27
-	const ACL_NO		= 0;
28
-	const ACL_YES		= 1;
29
-	const ACL_NEVER		= 2;
27
+	const ACL_NO = 0;
28
+	const ACL_YES = 1;
29
+	const ACL_NEVER = 2;
30 30
 
31 31
 	static protected $_permission_i = array('i_view', 'i_watermark', 'i_upload', 'i_approve', 'i_edit', 'i_delete', 'i_report', 'i_rate');
32 32
 	static protected $_permission_c = array('c_read', 'c_post', 'c_edit', 'c_delete');
@@ -167,17 +167,17 @@  discard block
 block discarded – undo
167 167
 			$sql_select .= " MAX($permission) as $permission,";
168 168
 		}
169 169
 
170
-		$this->_auth_data[self::OWN_ALBUM]				= new \phpbbgallery\core\auth\set();
170
+		$this->_auth_data[self::OWN_ALBUM] = new \phpbbgallery\core\auth\set();
171 171
 		$this->_auth_data_never[self::OWN_ALBUM]		= new \phpbbgallery\core\auth\set();
172 172
 		$this->_auth_data[self::PERSONAL_ALBUM]			= new \phpbbgallery\core\auth\set();
173
-		$this->_auth_data_never[self::PERSONAL_ALBUM]	= new \phpbbgallery\core\auth\set();
173
+		$this->_auth_data_never[self::PERSONAL_ALBUM] = new \phpbbgallery\core\auth\set();
174 174
 
175 175
 		foreach ($albums as $album)
176 176
 		{
177 177
 			if ($album['album_user_id'] == self::PUBLIC_ALBUM)
178 178
 			{
179
-				$this->_auth_data[$album['album_id']]		= new \phpbbgallery\core\auth\set();
180
-				$this->_auth_data_never[$album['album_id']]	= new \phpbbgallery\core\auth\set();
179
+				$this->_auth_data[$album['album_id']] = new \phpbbgallery\core\auth\set();
180
+				$this->_auth_data_never[$album['album_id']] = new \phpbbgallery\core\auth\set();
181 181
 			}
182 182
 		}
183 183
 
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 
356 356
 		$zebra = null;
357 357
 
358
-		$albums = array();//@todo $this->cache->obtain_album_list();
358
+		$albums = array(); //@todo $this->cache->obtain_album_list();
359 359
 		foreach ($albums as $album)
360 360
 		{
361 361
 			if (!$album['album_auth_access'] || ($album['album_user_id'] == self::PUBLIC_ALBUM))# || ($album['album_user_id'] == $user_id))
Please login to merge, or discard this patch.
core/acp/albums_module.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$action		= $request->variable('action', '');
67 67
 		$update		= (isset($_POST['update'])) ? true : false;
68
-		$album_id	= $request->variable('a', 0);
68
+		$album_id = $request->variable('a', 0);
69 69
 
70
-		$this->parent_id	= $request->variable('parent_id', 0);
70
+		$this->parent_id = $request->variable('parent_id', 0);
71 71
 		$album_data = $errors = array();
72 72
 		if ($update && !check_form_key($form_key))
73 73
 		{
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 			switch ($action)
82 82
 			{
83 83
 				case 'delete':
84
-					$action_subalbums	= $request->variable('action_subalbums', '');
85
-					$subalbums_to_id	= $request->variable('subalbums_to_id', 0);
86
-					$action_images		= $request->variable('action_images', '');
87
-					$images_to_id		= $request->variable('images_to_id', 0);
84
+					$action_subalbums = $request->variable('action_subalbums', '');
85
+					$subalbums_to_id = $request->variable('subalbums_to_id', 0);
86
+					$action_images = $request->variable('action_images', '');
87
+					$images_to_id = $request->variable('images_to_id', 0);
88 88
 
89 89
 					$errors = $manage_albums->delete_album($album_id, $action_images, $action_subalbums, $images_to_id, $subalbums_to_id);
90 90
 
@@ -232,12 +232,12 @@  discard block
 block discarded – undo
232 232
 						$acl_url = '&amp;mode=manage&amp;action=v_mask&amp;album_id[]=' . $album_data['album_id'];
233 233
 
234 234
 						$message = ($action == 'add') ? $this->language->lang('ALBUM_CREATED') : $this->language->lang('ALBUM_UPDATED');
235
-						$message .= '<br /><br />' . sprintf($this->language->lang('REDIRECT_ACL'), '<a href="' . $phpbb_ext_gallery_core_url->append_sid('admin' , 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url) . '">', '</a>');
235
+						$message .= '<br /><br />' . sprintf($this->language->lang('REDIRECT_ACL'), '<a href="' . $phpbb_ext_gallery_core_url->append_sid('admin', 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url) . '">', '</a>');
236 236
 
237 237
 						// Redirect directly to permission settings screen
238 238
 						if ($action == 'add' && !$album_perm_from)
239 239
 						{
240
-							meta_refresh(5, $phpbb_ext_gallery_core_url->append_sid('admin' , 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url));
240
+							meta_refresh(5, $phpbb_ext_gallery_core_url->append_sid('admin', 'index', 'i=-phpbbgallery-core-acp-permissions_module' . $acl_url));
241 241
 						}
242 242
 
243 243
 						trigger_error($message . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
Please login to merge, or discard this patch.
core/acp/permissions_module.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 			'misc'	=> array('a_list', 'i_count', 'i_unlimited', 'a_count', 'a_unlimited', 'a_restrict'),
71 71
 		);
72 72
 		$permissions->p_masks[$gallery_auth::OWN_ALBUM] = array_merge($permissions->cats[$gallery_auth::OWN_ALBUM]['i'], $permissions->cats[$gallery_auth::OWN_ALBUM]['c'], $permissions->cats[$gallery_auth::OWN_ALBUM]['m'], $permissions->cats[$gallery_auth::OWN_ALBUM]['misc']);
73
-		$permissions->p_masks_anti[$gallery_auth::OWN_ALBUM] = array();// Note: we set i_view to 1 as default, so it's not needed on anti array('i_view');
73
+		$permissions->p_masks_anti[$gallery_auth::OWN_ALBUM] = array(); // Note: we set i_view to 1 as default, so it's not needed on anti array('i_view');
74 74
 
75 75
 		// Permissions for personal albums of other users
76 76
 		// Note: Do !NOT! hide the i_upload. It's used for the moving-permissions
@@ -1244,7 +1244,7 @@  discard block
 block discarded – undo
1244 1244
 	{
1245 1245
 		global $user, $phpbb_container;
1246 1246
 
1247
-		$phpbb_ext_gallery_core_auth =  $phpbb_container->get('phpbbgallery.core.auth');
1247
+		$phpbb_ext_gallery_core_auth = $phpbb_container->get('phpbbgallery.core.auth');
1248 1248
 
1249 1249
 		$disabled = false;
1250 1250
 		// We submit a "wrong" array on the check (to make it more easy) so we convert it here
Please login to merge, or discard this patch.
core/acp/gallery_logs_module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
 		add_form_key('acp_logs');
30 30
 		$page = $request->variable('page', 0);
31 31
 		$filter_log = $request->variable('lf', 'all');
32
-		$sort_days	= $request->variable('st', 0);
32
+		$sort_days = $request->variable('st', 0);
33 33
 		$sort_key	= $request->variable('sk', 't');
34 34
 		$sort_dir	= $request->variable('sd', 'd');
35 35
 		$deletemark = $request->variable('delmarked', false, false, \phpbb\request\request_interface::POST);
36
-		$marked		= $request->variable('mark', array(0));
36
+		$marked = $request->variable('mark', array(0));
37 37
 		$log = $phpbb_container->get('phpbbgallery.core.log');
38 38
 
39 39
 		// Delete entries if requested and able
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 				{
124 124
 					$additional['sort_dir'] = $sort_dir;
125 125
 				}
126
-				$log->build_list($filter_log, 25, ($page/25) + 1, -1, 0, $additional);
126
+				$log->build_list($filter_log, 25, ($page / 25) + 1, -1, 0, $additional);
127 127
 			break;
128 128
 
129 129
 			default:
Please login to merge, or discard this patch.