Passed
Push — master ( 9a5988...6db2c7 )
by Stanislav
03:11 queued 16s
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/moderate.php 1 patch
Braces   +16 added lines, -32 removed lines patch added patch discarded remove patch
@@ -148,8 +148,7 @@  discard block
 block discarded – undo
148 148
 			{
149 149
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
150 150
 			}
151
-		}
152
-		else
151
+		} else
153 152
 		{
154 153
 			$album = $this->album->get_info($album_id);
155 154
 			if (!$this->gallery_auth->acl_check('m_', $album['album_id'], $album['album_user_id']))
@@ -207,8 +206,7 @@  discard block
 block discarded – undo
207 206
 			{
208 207
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
209 208
 			}
210
-		}
211
-		else
209
+		} else
212 210
 		{
213 211
 			$album = $this->album->get_info($album_id);
214 212
 			if (!$this->gallery_auth->acl_check('m_status', $album['album_id'], $album['album_user_id']))
@@ -253,8 +251,7 @@  discard block
 block discarded – undo
253 251
 					$this->url->meta_refresh(3, $back_link);
254 252
 					trigger_error($message);
255 253
 				}
256
-			}
257
-			else
254
+			} else
258 255
 			{
259 256
 				$s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />';
260 257
 				$s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />';
@@ -303,8 +300,7 @@  discard block
 block discarded – undo
303 300
 			{
304 301
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
305 302
 			}
306
-		}
307
-		else
303
+		} else
308 304
 		{
309 305
 			$album = $this->album->get_info($album_id);
310 306
 			if (!$this->gallery_auth->acl_check('m_', $album['album_id'], $album['album_user_id']))
@@ -351,8 +347,7 @@  discard block
 block discarded – undo
351 347
 				$message = $this->language->lang('WAITING_REPORTED_DONE', count($report_ary));
352 348
 				$this->url->meta_refresh(3, $back_link);
353 349
 				trigger_error($message);
354
-			}
355
-			else
350
+			} else
356 351
 			{
357 352
 				$s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />';
358 353
 				$s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />';
@@ -372,8 +367,7 @@  discard block
 block discarded – undo
372 367
 			{
373 368
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
374 369
 			}
375
-		}
376
-		else
370
+		} else
377 371
 		{
378 372
 			$album = $this->album->get_info($album_id);
379 373
 			if (!$this->gallery_auth->acl_check('m_report', $album['album_id'], $album['album_user_id']))
@@ -468,8 +462,7 @@  discard block
 block discarded – undo
468 462
 						trigger_error($message);
469 463
 					break;
470 464
 				}
471
-			}
472
-			else
465
+			} else
473 466
 			{
474 467
 				$s_hidden_fields = '<input type="hidden" name="select_action" value="' . $action . '" />';
475 468
 				$s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />';
@@ -490,8 +483,7 @@  discard block
 block discarded – undo
490 483
 						'S_HIDDEN_FIELDS'	=> $s_hidden_fields,
491 484
 					));
492 485
 					return $this->helper->render('gallery/mcp_body.html', $this->language->lang('GALLERY'));
493
-				}
494
-				else
486
+				} else
495 487
 				{
496 488
 					confirm_box(false, $this->language->lang('QUEUES_A_' . strtoupper($action) . '2_CONFIRM'), $s_hidden_fields);
497 489
 				}
@@ -506,8 +498,7 @@  discard block
 block discarded – undo
506 498
 			{
507 499
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
508 500
 			}
509
-		}
510
-		else
501
+		} else
511 502
 		{
512 503
 			$album = $this->album->get_info($album_id);
513 504
 			if (!$this->gallery_auth->acl_check('m_', $album['album_id'], $album['album_user_id']))
@@ -581,8 +572,7 @@  discard block
 block discarded – undo
581 572
 					$message = $this->language->lang('WAITING_REPORTED_DONE', 1);
582 573
 					$this->url->meta_refresh(3, $back_link);
583 574
 					trigger_error($message);
584
-				}
585
-				else
575
+				} else
586 576
 				{
587 577
 					$s_hidden_fields = '<input type="hidden" name="action" value="reports_close" />';
588 578
 					confirm_box(false, $this->language->lang('REPORT_A_CLOSE2_CONFIRM'), $s_hidden_fields);
@@ -624,8 +614,7 @@  discard block
 block discarded – undo
624 614
 			{
625 615
 				$select_select .= '<option value="images_unapprove">' . $this->language->lang('QUEUE_A_UNAPPROVE') . '</option>';
626 616
 				$select_select .= '<option value="images_lock">' . $this->language->lang('QUEUE_A_LOCK') . '</option>';
627
-			}
628
-			else
617
+			} else
629 618
 			{
630 619
 				$select_select .= '<option value="images_approve">' . $this->language->lang('QUEUE_A_APPROVE') . '</option>';
631 620
 				$select_select .= '<option value="images_unapprove">' . $this->language->lang('QUEUE_A_UNAPPROVE') . '</option>';
@@ -644,8 +633,7 @@  discard block
 block discarded – undo
644 633
 			if ($open_report)
645 634
 			{
646 635
 				$select_select .= '<option value="reports_close">' . $this->language->lang('REPORT_A_CLOSE') . '</option>';
647
-			}
648
-			else
636
+			} else
649 637
 			{
650 638
 				$select_select .= '<option value="reports_open">' . $this->language->lang('REPORT_A_OPEN') . '</option>';
651 639
 			}
@@ -727,8 +715,7 @@  discard block
 block discarded – undo
727 715
 			));
728 716
 			return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY'));
729 717
 			//trigger_error($message);
730
-		}
731
-		else
718
+		} else
732 719
 		{
733 720
 			$this->template->assign_vars(array(
734 721
 				'S_NOTIFY_POSTER'			=> $show_notify,
@@ -777,8 +764,7 @@  discard block
 block discarded – undo
777 764
 			$message = sprintf($this->language->lang('WAITING_UNAPPROVED_IMAGE', 1));
778 765
 			meta_refresh($meta_refresh_time, $image_backlink);
779 766
 			trigger_error($message);
780
-		}
781
-		else
767
+		} else
782 768
 		{
783 769
 			$s_hidden_fields = '';
784 770
 			confirm_box(false, 'QUEUE_A_UNAPPROVE2', $s_hidden_fields);
@@ -819,8 +805,7 @@  discard block
 block discarded – undo
819 805
 			$this->album->update_info($moving_target);
820 806
 			meta_refresh($meta_refresh_time, $image_backlink);
821 807
 			trigger_error($message);
822
-		}
823
-		else
808
+		} else
824 809
 		{
825 810
 			$category_select = $this->album->get_albumbox(false, 'moving_target', $album_id, 'm_move', $album_id);
826 811
 			$this->template->assign_vars(array(
@@ -864,8 +849,7 @@  discard block
 block discarded – undo
864 849
 			$message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE',1));
865 850
 			meta_refresh($meta_refresh_time, $image_backlink);
866 851
 			trigger_error($message);
867
-		}
868
-		else
852
+		} else
869 853
 		{
870 854
 			$s_hidden_fields = '';
871 855
 			confirm_box(false, 'QUEUE_A_LOCK2', $s_hidden_fields);
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.