Passed
Push — master ( b0e9b2...87988d )
by Stanislav
18:47 queued 03:50
created
core/url.php 3 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -13,23 +13,23 @@  discard block
 block discarded – undo
13 13
 class url
14 14
 {
15 15
 	/**
16
-	* Path from the gallery root, back to phpbb's root
17
-	*/
16
+	 * Path from the gallery root, back to phpbb's root
17
+	 */
18 18
 	private $phpbb_root_path = '../';
19 19
 
20 20
 	/**
21
-	* Path from the phpbb root, into admin's root
22
-	*/
21
+	 * Path from the phpbb root, into admin's root
22
+	 */
23 23
 	private $phpbb_admin_path = 'adm/';
24 24
 
25 25
 	/**
26
-	* Path from the phpbb root, into gallery's file root
27
-	*/
26
+	 * Path from the phpbb root, into gallery's file root
27
+	 */
28 28
 	private $phpbb_gallery_file_path = 'files/phpbbgallery/';
29 29
 
30 30
 	/**
31
-	* Path from the phpbb root, into gallery's root
32
-	*/
31
+	 * Path from the phpbb root, into gallery's root
32
+	 */
33 33
 	private $phpbb_gallery_path = 'gallery/';
34 34
 
35 35
 	const IMAGE_PATH = 'images/';
@@ -223,16 +223,16 @@  discard block
 block discarded – undo
223 223
 	}
224 224
 
225 225
 	/**
226
-	* Creates beautiful relative path from ugly relative path
227
-	* Resolves .. (up directory)
228
-	*
229
-	* @author	bantu		based on phpbb_own_realpath() by Chris Smith
230
-	* @license	http://opensource.org/licenses/gpl-license.php GNU Public License
231
-	*
232
-	* @param	string		ugly path e.g. "../community/../gallery/"
233
-	* @param	bool		is it a full url, so we need to fix teh http:// at the beginning?
234
-	* @return	string		beautiful path e.g. "../gallery/"
235
-	*/
226
+	 * Creates beautiful relative path from ugly relative path
227
+	 * Resolves .. (up directory)
228
+	 *
229
+	 * @author	bantu		based on phpbb_own_realpath() by Chris Smith
230
+	 * @license	http://opensource.org/licenses/gpl-license.php GNU Public License
231
+	 *
232
+	 * @param	string		ugly path e.g. "../community/../gallery/"
233
+	 * @param	bool		is it a full url, so we need to fix teh http:// at the beginning?
234
+	 * @return	string		beautiful path e.g. "../gallery/"
235
+	 */
236 236
 	static public function beautiful_path($path, $is_full_url = false)
237 237
 	{
238 238
 		// Remove any repeated slashes
@@ -274,10 +274,10 @@  discard block
 block discarded – undo
274 274
 	}
275 275
 
276 276
 	/**
277
-	* Custom meta_refresh implementation
278
-	* @param	int		$time	Time in seconds.
279
-	* @param	string	$route	Route generated by $helper->route
280
-	*/
277
+	 * Custom meta_refresh implementation
278
+	 * @param	int		$time	Time in seconds.
279
+	 * @param	string	$route	Route generated by $helper->route
280
+	 */
281 281
 	public function meta_refresh($time, $route)
282 282
 	{
283 283
 		// For XHTML compatibility we change back & to &
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,12 +129,12 @@
 block discarded – undo
129 129
 
130 130
 		if (isset($args[1]))
131 131
 		{
132
-			$args[1] .= '';//@todo: phpbb_gallery::$display_popup;
132
+			$args[1] .= ''; //@todo: phpbb_gallery::$display_popup;
133 133
 		}
134 134
 
135 135
 		$params = $args + array(
136 136
 			0	=> '',
137
-			1	=> '',//@todo: phpbb_gallery::$display_popup,
137
+			1	=> '', //@todo: phpbb_gallery::$display_popup,
138 138
 			2	=> true,
139 139
 			3	=> false,
140 140
 		);
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@  discard block
 block discarded – undo
121 121
 		{
122 122
 			$mode = array_shift($args);
123 123
 			$args[0] = $this->path($mode) . $this->phpEx_file($args[0]);
124
-		}
125
-		else
124
+		} else
126 125
 		{
127 126
 			$args[0] = $this->path() . $this->phpEx_file($args[0]);
128 127
 		}
@@ -197,8 +196,7 @@  discard block
 block discarded – undo
197 196
 		if (!is_array($file))
198 197
 		{
199 198
 			include($this->path($path) . $sub_directory . $this->phpEx_file($file));
200
-		}
201
-		else
199
+		} else
202 200
 		{
203 201
 			foreach ($file as $real_file)
204 202
 			{
@@ -244,8 +242,7 @@  discard block
 block discarded – undo
244 242
 			if (strpos($path, 'https:/') === 0)
245 243
 			{
246 244
 				$path = 'https://' . substr($path, 7);
247
-			}
248
-			else if (strpos($path, 'http:/') === 0)
245
+			} else if (strpos($path, 'http:/') === 0)
249 246
 			{
250 247
 				$path = 'http://' . substr($path, 6);
251 248
 			}
@@ -300,15 +297,13 @@  discard block
 block discarded – undo
300 297
 		if ($this->config['force_server_vars'] == 1)
301 298
 		{
302 299
 			$url = $this->config['server_protocol'] . $url;
303
-		}
304
-		else
300
+		} else
305 301
 		{
306 302
 			$is_secure = $this->request->server('HTTPS', '');
307 303
 			if ($is_secure == 'on')
308 304
 			{
309 305
 				$url = 'https://' . $url;
310
-			}
311
-			else
306
+			} else
312 307
 			{
313 308
 				$url = 'http://' . $url;
314 309
 			}
Please login to merge, or discard this patch.
acpimport/migrations/m1_init.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
 			if (is_dir($file))
70 70
 			{
71 71
 				recursiveRemoveDirectory($file);
72
-			}
73
-			else
72
+			} else
74 73
 			{
75 74
 				unlink($file);
76 75
 			}
Please login to merge, or discard this patch.
acpimport/acp/main_module.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 			foreach ($images as $image_src)
59 59
 			{
60 60
 				/**
61
-				* Import the images
62
-				*/
61
+				 * Import the images
62
+				 */
63 63
 
64 64
 				$image_src = str_replace("{{$import_schema}}", "'", $image_src);
65 65
 				$image_src_full = $gallery_url->path('import') . utf8_decode($image_src);
@@ -153,21 +153,21 @@  discard block
 block discarded – undo
153 153
 						$file_link = $gallery_url->path('upload') . $image_filename;
154 154
 
155 155
 						/**
156
-						* Event to trigger before mass update
157
-						*
158
-						* @event phpbbgallery.acpimport.update_image_before
159
-						* @var	array	additional_sql_data		array of additional sql_data
160
-						* @var	string	file_link				String with real file link
161
-						* @since 1.2.0
162
-						*/
156
+						 * Event to trigger before mass update
157
+						 *
158
+						 * @event phpbbgallery.acpimport.update_image_before
159
+						 * @var	array	additional_sql_data		array of additional sql_data
160
+						 * @var	string	file_link				String with real file link
161
+						 * @since 1.2.0
162
+						 */
163 163
 						$vars = array('additional_sql_data', 'file_link');
164 164
 						extract($phpbb_dispatcher->trigger_event('phpbbgallery.acpimport.update_image_before', compact($vars)));
165 165
 
166 166
 						if (($filetype[0] > $gallery_config->get('max_width')) || ($filetype[1] > $gallery_config->get('max_height')))
167 167
 						{
168 168
 							/**
169
-							* Resize overside images
170
-							*/
169
+							 * Resize overside images
170
+							 */
171 171
 							if ($gallery_config->get('allow_resize'))
172 172
 							{
173 173
 								$image_tools->resize_image($gallery_config->get('max_width'), $gallery_config->get('max_height'));
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
 						$file_updated = (bool) $image_tools->resized;
181 181
 
182 182
 						/**
183
-						* Event to trigger before mass update
184
-						*
185
-						* @event phpbbgallery.acpimport.update_image
186
-						* @var	array	additional_sql_data		array of additional sql_data
187
-						* @var	bool	file_updated			is file resized
188
-						* @since 1.2.0
189
-						*/
183
+						 * Event to trigger before mass update
184
+						 *
185
+						 * @event phpbbgallery.acpimport.update_image
186
+						 * @var	array	additional_sql_data		array of additional sql_data
187
+						 * @var	bool	file_updated			is file resized
188
+						 * @since 1.2.0
189
+						 */
190 190
 						$vars = array('additional_sql_data', 'file_updated');
191 191
 						extract($phpbb_dispatcher->trigger_event('phpbbgallery.acpimport.update_image', compact($vars)));
192 192
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 	function import()
34 34
 	{
35
-		global $db, $template, $user, $phpbb_dispatcher, $phpbb_container, $gallery_url, $request, $table_prefix ,$gallery_config, $gallery_album, $request;
35
+		global $db, $template, $user, $phpbb_dispatcher, $phpbb_container, $gallery_url, $request, $table_prefix, $gallery_config, $gallery_album, $request;
36 36
 
37 37
 		$import_schema = $request->variable('import_schema', '');
38 38
 		$images = $request->variable('images', array(''), true);
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 			$album_id = $request->variable('album_id', 0);
303 303
 			if (isset($_POST['users_pega']))
304 304
 			{
305
-				$image_user =  $phpbb_container->get('phpbbgallery.core.user');
305
+				$image_user = $phpbb_container->get('phpbbgallery.core.user');
306 306
 				$image_user->set_user_id($user_row['user_id']);
307 307
 				if ($user->data['user_id'] != $user_row['user_id'])
308 308
 				{
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
 				// Replace the md5 with the ' again and remove the space at the end to prevent \' troubles
48 48
 				$user_data['username'] = utf8_substr(str_replace("{{$import_schema}}", "'", $user_data['username']), 0, -1);
49 49
 				$image_name = utf8_substr(str_replace("{{$import_schema}}", "'", $image_name), 0, -1);
50
-			}
51
-			else
50
+			} else
52 51
 			{
53 52
 				global $phpEx;
54 53
 				trigger_error($user->lang('MISSING_IMPORT_SCHEMA', ($import_schema . '.' . $phpEx)), E_USER_WARNING);
@@ -198,8 +197,7 @@  discard block
 block discarded – undo
198 197
 						if ($filename || ($image_name == ''))
199 198
 						{
200 199
 							$sql_ary['image_name'] = str_replace("_", " ", utf8_substr($image_src, 0, utf8_strrpos($image_src, '.')));
201
-						}
202
-						else
200
+						} else
203 201
 						{
204 202
 							$sql_ary['image_name'] = str_replace('{NUM}', $num_offset + $done_images, $image_name);
205 203
 						}
@@ -239,14 +237,12 @@  discard block
 block discarded – undo
239 237
 				if (!$errors)
240 238
 				{
241 239
 					trigger_error(sprintf($user->lang['IMPORT_FINISHED'], $done_images) . adm_back_link($this->u_action));
242
-				}
243
-				else
240
+				} else
244 241
 				{
245 242
 					$errors = explode("\n", $errors);
246 243
 					trigger_error(sprintf($user->lang['IMPORT_FINISHED_ERRORS'], $done_images - sizeof($errors)) . implode('<br />', $errors) . adm_back_link($this->u_action), E_USER_WARNING);
247 244
 				}
248
-			}
249
-			else
245
+			} else
250 246
 			{
251 247
 				// Write the new list
252 248
 				$this->create_import_schema($import_schema, $album_id, $user_data, $start_time, $num_offset, $done_images, $todo_images, $image_name, $filename, $images);
@@ -256,8 +252,7 @@  discard block
 block discarded – undo
256 252
 				meta_refresh(1, $forward_url);
257 253
 				trigger_error(sprintf($user->lang['IMPORT_DEBUG_MES'], $done_images, $todo_images));
258 254
 			}
259
-		}
260
-		else if ($submit)
255
+		} else if ($submit)
261 256
 		{
262 257
 			if (!check_form_key('acp_gallery'))
263 258
 			{
@@ -313,8 +308,7 @@  discard block
 block discarded – undo
313 308
 						$album_id = $gallery_album->generate_personal_album($user_row['username'], $user_row['user_id'], $user_row['user_colour'], $image_user);
314 309
 					}
315 310
 					unset($image_user);
316
-				}
317
-				else
311
+				} else
318 312
 				{
319 313
 					$album_id = $image_user->get_data('personal_album_id');
320 314
 					if (!$album_id)
Please login to merge, or discard this patch.
acpcleanup/cleanup.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 	}
90 90
 
91 91
 	/**
92
-	* Delete source files without a database entry.
93
-	*
94
-	* @param	array	$filenames		An array of filenames
95
-	* @return	string	Language key for the success message.
96
-	*/
92
+	 * Delete source files without a database entry.
93
+	 *
94
+	 * @param	array	$filenames		An array of filenames
95
+	 * @return	string	Language key for the success message.
96
+	 */
97 97
 	public function delete_files($filenames)
98 98
 	{
99 99
 		foreach ($filenames as $file)
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 
108 108
 	/**
109
-	* Delete images, where the source file is missing.
110
-	*
111
-	* @param	mixed	$image_ids		Either an array of integers or an integer.
112
-	* @return	string	Language key for the success message.
113
-	*/
109
+	 * Delete images, where the source file is missing.
110
+	 *
111
+	 * @param	mixed	$image_ids		Either an array of integers or an integer.
112
+	 * @return	string	Language key for the success message.
113
+	 */
114 114
 	public function delete_images($image_ids)
115 115
 	{
116 116
 		$this->log->add_log('admin', 'clean_deleteentries', 0, 0, array('LOG_CLEANUP_DELETE_ENTRIES', count($image_ids)));
@@ -120,11 +120,11 @@  discard block
 block discarded – undo
120 120
 	}
121 121
 
122 122
 	/**
123
-	* Delete images, where the author is missing.
124
-	*
125
-	* @param	mixed	$image_ids		Either an array of integers or an integer.
126
-	* @return	string	Language key for the success message.
127
-	*/
123
+	 * Delete images, where the author is missing.
124
+	 *
125
+	 * @param	mixed	$image_ids		Either an array of integers or an integer.
126
+	 * @return	string	Language key for the success message.
127
+	 */
128 128
 	public function delete_author_images($image_ids)
129 129
 	{
130 130
 		$this->log->add_log('admin', 'clean_deletenoauthors', 0, 0, array('LOG_CLEANUP_DELETE_NO_AUTHOR', count($image_ids)));
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
 	}
135 135
 
136 136
 	/**
137
-	* Delete comments, where the author is missing.
138
-	*
139
-	* @param	mixed	$comment_ids	Either an array of integers or an integer.
140
-	* @return	string	Language key for the success message.
141
-	*/
137
+	 * Delete comments, where the author is missing.
138
+	 *
139
+	 * @param	mixed	$comment_ids	Either an array of integers or an integer.
140
+	 * @return	string	Language key for the success message.
141
+	 */
142 142
 	public function delete_author_comments($comment_ids)
143 143
 	{
144 144
 		$this->log->add_log('admin', 'clean_deletecna', 0, 0, array('LOG_CLEANUP_COMMENT_DELETE_NO_AUTHOR', count($comment_ids)));
@@ -148,12 +148,12 @@  discard block
 block discarded – undo
148 148
 	}
149 149
 
150 150
 	/**
151
-	* Delete unwanted and obsolent personal galleries.
152
-	*
153
-	* @param	array	$unwanted_pegas		User IDs we want to delete the pegas.
154
-	* @param	array	$obsolent_pegas		User IDs we want to delete the pegas.
155
-	* @return	array	Language keys for the success messages.
156
-	*/
151
+	 * Delete unwanted and obsolent personal galleries.
152
+	 *
153
+	 * @param	array	$unwanted_pegas		User IDs we want to delete the pegas.
154
+	 * @param	array	$obsolent_pegas		User IDs we want to delete the pegas.
155
+	 * @return	array	Language keys for the success messages.
156
+	 */
157 157
 	public function delete_pegas($unwanted_pegas, $obsolent_pegas)
158 158
 	{
159 159
 
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
 	}
285 285
 
286 286
 	/**
287
-	*
288
-	*/
287
+	 *
288
+	 */
289 289
 	public function prune($pattern)
290 290
 	{
291 291
 		$sql_where = '';
@@ -329,8 +329,8 @@  discard block
 block discarded – undo
329 329
 	}
330 330
 
331 331
 	/**
332
-	*
333
-	*/
332
+	 *
333
+	 */
334 334
 	public function lang_prune_pattern($pattern)
335 335
 	{
336 336
 		if (isset($pattern['image_album_id']))
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -196,8 +196,7 @@  discard block
 block discarded – undo
196 196
 			if (isset($user_image_count[(int) $row['image_user_id']]))
197 197
 			{
198 198
 				$user_image_count[(int) $row['image_user_id']]++;
199
-			}
200
-			else
199
+			} else
201 200
 			{
202 201
 				$user_image_count[(int) $row['image_user_id']] = 1;
203 202
 			}
@@ -246,8 +245,7 @@  discard block
 block discarded – undo
246 245
 				$this->gallery_config->set('newest_pega_username', $newest_pega['username']);
247 246
 				$this->gallery_config->set('newest_pega_user_colour', $newest_pega['user_colour']);
248 247
 				$this->gallery_config->set('newest_pega_album_id', $newest_pega['album_id']);
249
-			}
250
-			else
248
+			} else
251 249
 			{
252 250
 				$this->gallery_config->set('newest_pega_user_id', 0);
253 251
 				$this->gallery_config->set('newest_pega_username', '');
Please login to merge, or discard this patch.
acpcleanup/acp/main_module.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -223,14 +223,12 @@  discard block
 block discarded – undo
223 223
 			}
224 224
 
225 225
 			trigger_error($message_string . adm_back_link($this->u_action));
226
-		}
227
-		else if ($delete || $prune || (isset($_POST['cancel'])))
226
+		} else if ($delete || $prune || (isset($_POST['cancel'])))
228 227
 		{
229 228
 			if (isset($_POST['cancel']))
230 229
 			{
231 230
 				trigger_error($user->lang['CLEAN_GALLERY_ABORT'] . adm_back_link($this->u_action), E_USER_WARNING);
232
-			}
233
-			else
231
+			} else
234 232
 			{
235 233
 				$user->lang['CLEAN_GALLERY_CONFIRM'] = $user->lang['CONFIRM_CLEAN'];
236 234
 				if ($missing_sources)
@@ -261,8 +259,7 @@  discard block
 block discarded – undo
261 259
 						if (in_array($row['album_user_id'], $personals_bad))
262 260
 						{
263 261
 							$personals_bad_names[] = $row['album_name'];
264
-						}
265
-						else
262
+						} else
266 263
 						{
267 264
 							$missing_personals_names[] = $row['album_name'];
268 265
 						}
@@ -280,8 +277,7 @@  discard block
 block discarded – undo
280 277
 				if ($prune && empty($prune_pattern))
281 278
 				{
282 279
 					trigger_error($user->lang['CLEAN_PRUNE_NO_PATTERN'] . adm_back_link($this->u_action), E_USER_WARNING);
283
-				}
284
-				else if ($prune && $prune_pattern)
280
+				} else if ($prune && $prune_pattern)
285 281
 				{
286 282
 					$user->lang['CLEAN_GALLERY_CONFIRM'] = $user->lang('CONFIRM_PRUNE', $core_cleanup->lang_prune_pattern($prune_pattern)) . '<br />' . $user->lang['CLEAN_GALLERY_CONFIRM'];
287 283
 				}
Please login to merge, or discard this patch.
exif/language/bg/exif.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 	'EXIF_CAM_MODEL'			=> 'Camera-model',
31 31
 	'EXIF_DATE'					=> 'Image taken on',
32 32
 	'EXIF_EXPOSURE'				=> 'Shutter speed',
33
-	'EXIF_EXPOSURE_EXP'			=> '%s Sec',// 'EXIF_EXPOSURE' unit
33
+	'EXIF_EXPOSURE_EXP'			=> '%s Sec', // 'EXIF_EXPOSURE' unit
34 34
 	'EXIF_EXPOSURE_BIAS'		=> 'Exposure bias',
35
-	'EXIF_EXPOSURE_BIAS_EXP'	=> '%s EV',// 'EXIF_EXPOSURE_BIAS' unit
35
+	'EXIF_EXPOSURE_BIAS_EXP'	=> '%s EV', // 'EXIF_EXPOSURE_BIAS' unit
36 36
 	'EXIF_EXPOSURE_PROG'		=> 'Exposure program',
37 37
 	'EXIF_EXPOSURE_PROG_0'		=> 'Not defined',
38 38
 	'EXIF_EXPOSURE_PROG_1'		=> 'Manual',
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	'EXIF_FLASH_CASE_93'		=> 'Flash fired, auto mode, return light not detected, red-eye reduction mode',
73 73
 	'EXIF_FLASH_CASE_95'		=> 'Flash fired, auto mode, return light detected, red-eye reduction mode',
74 74
 	'EXIF_FOCAL'				=> 'Focus length',
75
-	'EXIF_FOCAL_EXP'			=> '%s mm',// 'EXIF_FOCAL' unit
75
+	'EXIF_FOCAL_EXP'			=> '%s mm', // 'EXIF_FOCAL' unit
76 76
 	'EXIF_ISO'					=> 'ISO speed rating',
77 77
 	'EXIF_METERING_MODE'		=> 'Metering mode',
78 78
 	'EXIF_METERING_MODE_0'		=> 'Unknown',
Please login to merge, or discard this patch.
core/controller/album.php 2 patches
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -117,8 +117,7 @@  discard block
 block discarded – undo
117 117
 		try
118 118
 		{
119 119
 			$this->loader->load($album_id);
120
-		}
121
-		catch (\Exception $e)
120
+		} catch (\Exception $e)
122 121
 		{
123 122
 			throw new \phpbb\exception\http_exception(404, 'ALBUM_NOT_EXIST');
124 123
 		}
@@ -178,8 +177,7 @@  discard block
 block discarded – undo
178 177
 					'phpbbgallery_core_album_upload',
179 178
 					array('album_id' => (int) $album_id)
180 179
 				));
181
-			}
182
-			else
180
+			} else
183 181
 			{
184 182
 				if ($album_data['contest_start'] + $album_data['contest_rating'] > time())
185 183
 				{
@@ -236,8 +234,7 @@  discard block
 block discarded – undo
236 234
 		if (in_array($sort_key, array('r', 'ra')))
237 235
 		{
238 236
 			$sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'ASC' : 'DESC');
239
-		}
240
-		else
237
+		} else
241 238
 		{
242 239
 			$sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
243 240
 		}
@@ -460,8 +457,7 @@  discard block
 block discarded – undo
460 457
 				));
461 458
 				$this->url->meta_refresh(3, $back_link);
462 459
 				return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY'));
463
-			}
464
-			else
460
+			} else
465 461
 			{
466 462
 				$this->notifications_helper->add_albums($album_id);
467 463
 				$this->template->assign_vars(array(
@@ -470,14 +466,12 @@  discard block
 block discarded – undo
470 466
 				$this->url->meta_refresh(3, $back_link);
471 467
 				return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY'));
472 468
 			}
473
-		}
474
-		else
469
+		} else
475 470
 		{
476 471
 			if ($this->notifications_helper->get_watched_album($album_id) == 1)
477 472
 			{
478 473
 				$lang = $this->language->lang('UNWATCH_ALBUM');
479
-			}
480
-			else
474
+			} else
481 475
 			{
482 476
 				$lang = $this->language->lang('WATCH_ALBUM');
483 477
 			}
@@ -509,8 +503,7 @@  discard block
 block discarded – undo
509 503
 			if (!$this->user->data['is_registered'])
510 504
 			{
511 505
 				login_box();
512
-			}
513
-			else
506
+			} else
514 507
 			{
515 508
 				//return $this->error('NOT_AUTHORISED', 403);
516 509
 				trigger_error($this->language->lang('NOT_AUTHORISED'));
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 			$album_user_id = $image_data['album_user_id'];
343 343
 
344 344
 			//@todo: $rating = new phpbb_gallery_image_rating($image_data['image_id'], $image_data, $image_data);
345
-			$image_data['rating'] = '0';//@todo: $rating->get_image_rating(false, false);
345
+			$image_data['rating'] = '0'; //@todo: $rating->get_image_rating(false, false);
346 346
 			//@todo: unset($rating);
347 347
 
348 348
 			$s_user_allowed = (($image_data['image_user_id'] == $this->user->data['user_id']) && ($album_status != \phpbbgallery\core\block::ALBUM_LOCKED));
@@ -400,14 +400,14 @@  discard block
 block discarded – undo
400 400
 
401 401
 				'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,
402 402
 				'S_IMAGE_REPORTED'           => $image_data['image_reported'],
403
-				'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']) : '',
403
+				'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']) : '',
404 404
 				'S_STATUS_APPROVED'          => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED),
405 405
 				'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,
406 406
 				'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'])) : '',
407 407
 				'S_STATUS_LOCKED'            => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_LOCKED),
408 408
 
409 409
 				'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'])*/ : '',
410
-				'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']) : '',
410
+				'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']) : '',
411 411
 				'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')),
412 412
 
413 413
 				'S_CONTEST_RANK' => $image_data['image_contest_rank'],
Please login to merge, or discard this patch.
core/moderate.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@  discard block
 block discarded – undo
85 85
 			{
86 86
 				$mod_array[] = 0;
87 87
 			}
88
-		}
89
-		else
88
+		} else
90 89
 		{
91 90
 			$mod_array = array($album);
92 91
 		}
@@ -162,8 +161,7 @@  discard block
 block discarded – undo
162 161
 			$this->template->assign_vars(array(
163 162
 				'TOTAL_PAGES' => $this->lang->lang('PAGE_TITLE_NUMBER', $page + 1),
164 163
 			));
165
-		}
166
-		else
164
+		} else
167 165
 		{
168 166
 			$this->pagination->generate_template_pagination(array(
169 167
 				'routes' => array(
Please login to merge, or discard this patch.
core/user.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
 		if (isset($this->data[$key]))
161 161
 		{
162 162
 			return $this->data[$key];
163
-		}
164
-		else if ($default && $this->get_default_value($key) !== null)
163
+		} else if ($default && $this->get_default_value($key) !== null)
165 164
 		{
166 165
 			return $this->get_default_value($key);
167 166
 		}
@@ -359,12 +358,10 @@  discard block
 block discarded – undo
359 358
 		if (is_array($user_ids) && !empty($user_ids))
360 359
 		{
361 360
 			$sql_where = 'WHERE ' . $this->db->sql_in_set('user_id', array_map('intval', $user_ids));
362
-		}
363
-		else if ($user_ids == 'all')
361
+		} else if ($user_ids == 'all')
364 362
 		{
365 363
 			$sql_where = '';
366
-		}
367
-		else
364
+		} else
368 365
 		{
369 366
 			$sql_where = 'WHERE user_id = ' . (int) $user_ids;
370 367
 		}
@@ -395,8 +392,7 @@  discard block
 block discarded – undo
395 392
 					{
396 393
 						// While incrementing, the iamges might be lower than 0.
397 394
 						$validated_data[$name] = (int) $value;
398
-					}
399
-					else
395
+					} else
400 396
 					{
401 397
 						$validated_data[$name] = max(0, (int) $value);
402 398
 					}
@@ -542,8 +538,7 @@  discard block
 block discarded – undo
542 538
 					'warnings'            => 0,
543 539
 					'allow_pm'            => 0,
544 540
 				);
545
-			}
546
-			else
541
+			} else
547 542
 			{
548 543
 				$user_sig = '';
549 544
 				// We add the signature to every posters entry because enable_sig is post dependent
@@ -589,8 +584,7 @@  discard block
 block discarded – undo
589 584
 				if ((!empty($row['user_allow_viewemail']) && $this->auth->acl_get('u_sendemail')) || $this->auth->acl_get('a_email'))
590 585
 				{
591 586
 					$user_cache[$user_id]['email'] = ($this->config['board_email_form'] && $this->config['email_enable']) ? append_sid("{$this->root_path}memberlist.$this->php_ext", "mode=email&amp;u=$user_id") : (($this->config['board_hide_emails'] && !$this->auth->acl_get('a_email')) ? '' : 'mailto:' . $row['user_email']);
592
-				}
593
-				else
587
+				} else
594 588
 				{
595 589
 					$user_cache[$user_id]['email'] = '';
596 590
 				}
@@ -603,8 +597,7 @@  discard block
 block discarded – undo
603 597
 						if ($diff == 0)
604 598
 						{
605 599
 							$diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
606
-						}
607
-						else
600
+						} else
608 601
 						{
609 602
 							$diff = ($diff < 0) ? 1 : 0;
610 603
 						}
Please login to merge, or discard this patch.