Passed
Push — master ( 4c9f6d...9f98fb )
by Stanislav
03:51 queued 01:00
created
exif/exif.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@  discard block
 block discarded – undo
105 105
 		if ($this->status == self::DBSAVED)
106 106
 		{
107 107
 			$this->data = unserialize($data);
108
-		}
109
-		else if (($this->status == self::AVAILABLE) || ($this->status == self::UNKNOWN))
108
+		} else if (($this->status == self::AVAILABLE) || ($this->status == self::UNKNOWN))
110 109
 		{
111 110
 			$this->read();
112 111
 		}
@@ -132,8 +131,7 @@  discard block
 block discarded – undo
132 131
 				if (!in_array($key, self::$allowed_groups))
133 132
 				{
134 133
 					unset($this->data[$key]);
135
-				}
136
-				else
134
+				} else
137 135
 				{
138 136
 					foreach ($this->data[$key] as $subkey => $array)
139 137
 					{
@@ -147,8 +145,7 @@  discard block
 block discarded – undo
147 145
 
148 146
 			$this->serialized = serialize($this->data);
149 147
 			$this->status = self::DBSAVED;
150
-		}
151
-		else
148
+		} else
152 149
 		{
153 150
 			$this->status = self::UNAVAILABLE;
154 151
 		}
@@ -198,8 +195,7 @@  discard block
 block discarded – undo
198 195
 			if (($num > $den) && $den)
199 196
 			{
200 197
 				$exif_exposure = $num / $den;
201
-			}
202
-			else if ($num)
198
+			} else if ($num)
203 199
 			{
204 200
 				$exif_exposure = ' 1/' . $den / $num ;
205 201
 			}
@@ -250,8 +246,7 @@  discard block
 block discarded – undo
250 246
 				if (($num / $den) == 0)
251 247
 				{
252 248
 					$exif_exposure_bias = 0;
253
-				}
254
-				else
249
+				} else
255 250
 				{
256 251
 					$exif_exposure_bias = $this->data["EXIF"]["ExposureBiasValue"];
257 252
 				}
Please login to merge, or discard this patch.
exif/event/exif_listener.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -146,8 +146,7 @@
 block discarded – undo
146 146
 
147 147
 			$event['additional_sql_data'] = $additional_sql_data;
148 148
 			unset($exif);
149
-		}
150
-		else
149
+		} else
151 150
 		{
152 151
 			$additional_sql_data = $event['additional_sql_data'];
153 152
 			$additional_sql_data['image_exif_data'] = '';
Please login to merge, or discard this patch.
core/report.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -249,8 +249,7 @@  discard block
 block discarded – undo
249 249
 			{
250 250
 				$mod_array[] = 0;
251 251
 			}
252
-		}
253
-		else
252
+		} else
254 253
 		{
255 254
 			$mod_array = array($album);
256 255
 		}
@@ -340,8 +339,7 @@  discard block
 block discarded – undo
340 339
 			$this->template->assign_vars(array(
341 340
 				'TOTAL_PAGES'				=> $this->language->lang('PAGE_TITLE_NUMBER', $page + 1),
342 341
 			));
343
-		}
344
-		else
342
+		} else
345 343
 		{
346 344
 			$this->pagination->generate_template_pagination(array(
347 345
 				'routes' => array(
@@ -396,8 +394,7 @@  discard block
 block discarded – undo
396 394
 		if (is_array($ids))
397 395
 		{
398 396
 			return array_map('intval', $ids);
399
-		}
400
-		else
397
+		} else
401 398
 		{
402 399
 			return array((int) $ids);
403 400
 		}
Please login to merge, or discard this patch.
core/upload.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -144,8 +144,7 @@  discard block
 block discarded – undo
144 144
 			{
145 145
 				$this->zip_file = $this->file;
146 146
 				$this->upload_zip();
147
-			}
148
-			else
147
+			} else
149 148
 			{
150 149
 				$image_id = $this->prepare_file();
151 150
 				if ($image_id)
@@ -210,8 +209,7 @@  discard block
 block discarded – undo
210 209
 			if (is_dir($current_dir . $file))
211 210
 			{
212 211
 				$this->read_zip_folder($current_dir . $file . '/');
213
-			}
214
-			else if (in_array(utf8_substr(strtolower($file), utf8_strrpos($file, '.') + 1), self::get_allowed_types(false, true)))
212
+			} else if (in_array(utf8_substr(strtolower($file), utf8_strrpos($file, '.') + 1), self::get_allowed_types(false, true)))
215 213
 			{
216 214
 				if (!$this->file_limit || ($this->uploaded_files < $this->file_limit))
217 215
 				{
@@ -231,23 +229,20 @@  discard block
 block discarded – undo
231 229
 					{
232 230
 						$this->uploaded_files++;
233 231
 						$this->images[] = (int) $image_id;
234
-					}
235
-					else
232
+					} else
236 233
 					{
237 234
 						if ($this->file->error)
238 235
 						{
239 236
 							$this->new_error($this->language->lang('UPLOAD_ERROR', $this->file->get('uploadname'), implode('<br />&raquo; ', $this->file->error)));
240 237
 						}
241 238
 					}
242
-				}
243
-				else
239
+				} else
244 240
 				{
245 241
 					$this->quota_error();
246 242
 					@unlink($current_dir . $file);
247 243
 				}
248 244
 
249
-			}
250
-			else
245
+			} else
251 246
 			{
252 247
 				@unlink($current_dir . $file);
253 248
 			}
@@ -356,8 +351,7 @@  discard block
 block discarded – undo
356 351
 		{
357 352
 			$this->file->clean_filename('unique_ext');
358 353
 			$this->file->move_file(substr($this->gallery_url->path('upload'), 0, -1), false, false, CHMOD_ALL);
359
-		}
360
-		else
354
+		} else
361 355
 		{
362 356
 			// Okay, this looks hacky, but what we do here is, we store the directory name in the filename.
363 357
 			// However phpBB strips directories form the filename, when moving, so we need to specify that again.
@@ -411,8 +405,7 @@  discard block
 block discarded – undo
411 405
 					//$this->file->height = $this->tools->image_size['height'];
412 406
 					//$this->file->width = $this->tools->image_size['width'];
413 407
 				}
414
-			}
415
-			else
408
+			} else
416 409
 			{
417 410
 				$this->file->remove();
418 411
 				$this->new_error($this->language->lang('UPLOAD_ERROR', $this->file->get('uploadname'), $this->language->lang('UPLOAD_IMAGE_SIZE_TOO_BIG')));
Please login to merge, or discard this patch.
core/contest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,8 +165,7 @@
 block discarded – undo
165 165
 			{
166 166
 				$this->resync($album_id);
167 167
 			}
168
-		}
169
-		else
168
+		} else
170 169
 		{
171 170
 			$this->resync((int) $album_ids);
172 171
 		}
Please login to merge, or discard this patch.
core/rating.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -216,8 +216,7 @@  discard block
 block discarded – undo
216 216
 						return $this->language->lang('CONTEST_RATING_HIDDEN');
217 217
 					}
218 218
 					return $this->language->lang('CONTEST_RESULT_HIDDEN', $this->user->format_date(($this->album_data('contest_start') + $this->album_data('contest_end')), false, true));
219
-				}
220
-				else
219
+				} else
221 220
 				{
222 221
 					if ($user_rating)
223 222
 					{
@@ -364,8 +363,7 @@  discard block
 block discarded – undo
364 363
 		if (is_array($image_ids))
365 364
 		{
366 365
 			$image_ids = array_map('intval', $image_ids);
367
-		}
368
-		else
366
+		} else
369 367
 		{
370 368
 			$image_ids = (int) $image_ids;
371 369
 		}
@@ -399,8 +397,7 @@  discard block
 block discarded – undo
399 397
 		if (is_array($image_ids))
400 398
 		{
401 399
 			$image_ids = array_map('intval', $image_ids);
402
-		}
403
-		else
400
+		} else
404 401
 		{
405 402
 			$image_ids = (int) $image_ids;
406 403
 		}
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 1 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.
core/controller/index.php 1 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.