Passed
Push — master ( 4c9f6d...9f98fb )
by Stanislav
03:51 queued 01:00
created
core/log.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -204,8 +204,7 @@  discard block
 block discarded – undo
204 204
 					$sql_array['GROUP_BY'] = 'l.description, l.log_id, i.image_id';
205 205
 				break;
206 206
 			}
207
-		}
208
-		else
207
+		} else
209 208
 		{
210 209
 			$sql_array['ORDER_BY'] = 'l.log_time ' . (isset($additional['sort_dir']) ? 'ASC' : 'DESC');
211 210
 			$sql_array['GROUP_BY'] = 'l.log_time, l.log_id, i.image_id';
@@ -219,8 +218,7 @@  discard block
 block discarded – undo
219 218
 		if ($row)
220 219
 		{
221 220
 			$count = $row['count'];
222
-		}
223
-		else
221
+		} else
224 222
 		{
225 223
 			$count = 0;
226 224
 		}
@@ -281,8 +279,7 @@  discard block
 block discarded – undo
281 279
 				'params' => array(
282 280
 				),
283 281
 			), 'pagination', 'page', $count, $limit, ($page-1) * $limit);
284
-		}
285
-		else if ($album == -1)
282
+		} else if ($album == -1)
286 283
 		{
287 284
 			$url_array = array(
288 285
 				'i' => '-phpbbgallery-core-acp-gallery_logs_module',
@@ -303,8 +300,7 @@  discard block
 block discarded – undo
303 300
 			$url = http_build_query($url_array,'','&');
304 301
 
305 302
 			$this->pagination->generate_template_pagination(append_sid('index.php?' . $url), 'pagination', 'page', $count, $limit, ($page-1) * $limit);
306
-		}
307
-		else
303
+		} else
308 304
 		{
309 305
 			$this->pagination->generate_template_pagination(array(
310 306
 				'routes' => array(
Please login to merge, or discard this patch.
core/image/image.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -363,8 +363,7 @@  discard block
 block discarded – undo
363 363
 				{
364 364
 					$url = $this->url->append_sid('image_page', "album_id=$album_id&image_id=$next_image{$additional_parameters}");
365 365
 					$tpl = '<a href="{IMAGE_URL}" title="{IMAGE_NAME}">{CONTENT}</a>';
366
-				}
367
-				else
366
+				} else
368 367
 				{
369 368
 					$tpl = '{CONTENT}';
370 369
 				}
@@ -440,8 +439,7 @@  discard block
 block discarded – undo
440 439
 		{
441 440
 			$this->gallery_config->inc('num_images', (int) $num_images);
442 441
 			$this->gallery_config->inc('num_comments', (int) $num_comments);
443
-		}
444
-		else
442
+		} else
445 443
 		{
446 444
 			$this->gallery_config->dec('num_images', (int) $num_images);
447 445
 			$this->gallery_config->dec('num_comments', (int) $num_comments);
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
 				$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
 					$clean_gallery_confirm = $user->lang('CONFIRM_PRUNE', $core_cleanup->lang_prune_pattern($prune_pattern)) . '<br />' . $clean_gallery_confirm;
287 283
 				}
Please login to merge, or discard this patch.
core/controller/file.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -238,8 +238,7 @@  discard block
 block discarded – undo
238 238
 			$this->data['album_user_id'] = 1;
239 239
 			$this->data['image_filemissing'] = 0;
240 240
 			$this->data['album_watermark'] = 0;
241
-		}
242
-		else
241
+		} else
243 242
 		{
244 243
 			$sql = 'SELECT *
245 244
 				FROM ' . $this->table_images . ' i
@@ -409,8 +408,7 @@  discard block
 block discarded – undo
409 408
 			{
410 409
 				$response->headers->set('expires', '-1');
411 410
 			}
412
-		}
413
-		else
411
+		} else
414 412
 		{
415 413
 			$response->headers->set('Content-Disposition', 'inline; ' . $this->tool->header_filename(htmlspecialchars_decode($this->tool->image_name) . '.' . $this->tool->image_type));
416 414
 			if ($this->tool->is_ie_greater7($this->user->browser))
Please login to merge, or discard this patch.
core/album/display.php 1 patch
Braces   +15 added lines, -25 removed lines patch added patch discarded remove patch
@@ -226,8 +226,7 @@  discard block
 block discarded – undo
226 226
 					SET album_parents = '" . $this->db->sql_escape($album_data['album_parents']) . "'
227 227
 					WHERE parent_id = " . (int) $album_data['parent_id'];
228 228
 				$this->db->sql_query($sql);
229
-			}
230
-			else
229
+			} else
231 230
 			{
232 231
 				$album_parents = unserialize($album_data['album_parents']);
233 232
 			}
@@ -295,16 +294,14 @@  discard block
 block discarded – undo
295 294
 			if (!empty($row['user_id']))
296 295
 			{
297 296
 				$album_moderators[$a_id][] = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
298
-			}
299
-			else
297
+			} else
300 298
 			{
301 299
 				$group_name = (($row['group_type'] == GROUP_SPECIAL) ? $this->language->lang('G_' . $row['group_name']) : $row['group_name']);
302 300
 
303 301
 				if ($this->user->data['user_id'] != ANONYMOUS && !$this->auth->acl_get('u_viewprofile'))
304 302
 				{
305 303
 					$album_moderators[$a_id][] = '<span' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . '>' . $group_name . '</span>';
306
-				}
307
-				else
304
+				} else
308 305
 				{
309 306
 					$album_moderators[$a_id][] = '<a' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . ' href="' . append_sid($this->root_path . 'memberlist.' . $this->php_ext, 'mode=group&amp;g=' . $row['group_id']) . '">' . $group_name . '</a>';
310 307
 				}
@@ -348,8 +345,7 @@  discard block
 block discarded – undo
348 345
 			}
349 346
 			$root_data = array('album_id' => (int) \phpbbgallery\core\block::PUBLIC_ALBUM);
350 347
 			$sql_where = 'a.album_user_id = ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM;
351
-		}
352
-		else if ($root_data == 'personal')
348
+		} else if ($root_data == 'personal')
353 349
 		{
354 350
 			if ($mark_read == 'albums')
355 351
 			{
@@ -366,8 +362,7 @@  discard block
 block discarded – undo
366 362
 				{
367 363
 					$sql_where .= ' AND u.username_clean NOT ' . $this->db->sql_like_expression(chr($i) . $this->db->any_char);
368 364
 				}
369
-			}
370
-			else if ($first_char)
365
+			} else if ($first_char)
371 366
 			{
372 367
 				$sql_where .= ' AND u.username_clean ' . $this->db->sql_like_expression(substr($first_char, 0, 1) . $this->db->any_char);
373 368
 			}
@@ -411,8 +406,7 @@  discard block
 block discarded – undo
411 406
 					'phpbbgallery_core_search_recent_page',),
412 407
 					'params' => array()), 'pagination', 'page', $num_pegas, $limit, $start
413 408
 			);*/
414
-		}
415
-		else
409
+		} else
416 410
 		{
417 411
 			$sql_where = 'a.left_id > ' . $root_data['left_id'] . ' AND a.left_id < ' . $root_data['right_id'] . ' AND a.album_user_id = ' . $root_data['album_user_id'];
418 412
 		}
@@ -500,10 +494,12 @@  discard block
 block discarded – undo
500 494
 				continue;
501 495
 			}
502 496
 
503
-			if (false)//@todo !$this->gallery_auth->acl_check('a_list', $album_id, $row['album_user_id']))
497
+			if (false) {
498
+				//@todo !$this->gallery_auth->acl_check('a_list', $album_id, $row['album_user_id']))
504 499
 			{
505 500
 				// if the user does not have permissions to list this album, skip everything until next branch
506 501
 				$right_id = $row['right_id'];
502
+			}
507 503
 				continue;
508 504
 			}
509 505
 
@@ -528,8 +524,7 @@  discard block
 block discarded – undo
528 524
 				$album_rows[$parent_id]['album_type_last_image'] = $row['album_type'];
529 525
 				$album_rows[$parent_id]['album_contest_marked'] = $row['contest_marked'];
530 526
 				$album_rows[$parent_id]['orig_album_last_image_time'] = $row['album_last_image_time'];
531
-			}
532
-			else if ($row['album_type'])
527
+			} else if ($row['album_type'])
533 528
 			{
534 529
 				$subalbums[$parent_id][$album_id]['display'] = ($row['display_on_index']) ? true : false;
535 530
 				$subalbums[$parent_id][$album_id]['name'] = $row['album_name'];
@@ -571,16 +566,14 @@  discard block
 block discarded – undo
571 566
 				{
572 567
 					$this->misc->markread('all');
573 568
 					$message = $this->language->lang('RETURN_INDEX', '<a href="' . $redirect . '">', '</a>');
574
-				}
575
-				else
569
+				} else
576 570
 				{
577 571
 					$this->misc->markread('albums', $album_ids);
578 572
 					$message = $this->language->lang('RETURN_ALBUM', '<a href="' . $redirect . '">', '</a>');
579 573
 				}
580 574
 				meta_refresh(3, $redirect);
581 575
 				trigger_error($this->language->lang('ALBUMS_MARKED') . '<br /><br />' . $message);
582
-			}
583
-			else
576
+			} else
584 577
 			{
585 578
 				$message = $this->language->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>');
586 579
 				meta_refresh(3, $redirect);
@@ -658,8 +651,7 @@  discard block
 block discarded – undo
658 651
 							'name'		=> $subalbum_row['name'],
659 652
 							'unread'	=> $subalbum_unread,
660 653
 						);
661
-					}
662
-					else
654
+					} else
663 655
 					{
664 656
 						unset($subalbums[$album_id][$subalbum_id]);
665 657
 					}
@@ -672,8 +664,7 @@  discard block
 block discarded – undo
672 664
 
673 665
 				$l_subalbums = (sizeof($subalbums[$album_id]) == 1) ? $this->language->lang('SUBALBUM') : $this->language->lang('SUBALBUMS');
674 666
 				$folder_image = ($album_unread) ? 'forum_unread_subforum' : 'forum_read_subforum';
675
-			}
676
-			else
667
+			} else
677 668
 			{
678 669
 				$folder_alt = ($album_unread) ? 'NEW_IMAGES' : 'NO_NEW_IMAGES';
679 670
 				$folder_image = ($album_unread) ? 'forum_unread' : 'forum_read';
@@ -699,8 +690,7 @@  discard block
 block discarded – undo
699 690
 				$lastimage_uc_name = '';//@todo phpbb_ext_gallery_core_image::generate_link('image_name', $phpbb_ext_gallery->config->get('link_image_name'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
700 691
 				// phpbb_ext_gallery_core_image::generate_link('lastimage_icon', $phpbb_ext_gallery->config->get('link_image_icon'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
701 692
 				$lastimage_uc_icon = '';//@todo phpbb_ext_gallery_core_image::generate_link('lastimage_icon', $phpbb_ext_gallery->config->get('link_image_icon'), $lastimage_image_id, $lastimage_name, $lastimage_album_id);
702
-			}
703
-			else
693
+			} else
704 694
 			{
705 695
 				$lastimage_time = $lastimage_album_type = $lastimage_contest_marked = 0;
706 696
 				$lastimage_uc_fake_thumbnail = $lastimage_uc_fake_thumbnail_url = $lastimage_uc_thumbnail = $lastimage_uc_name = $lastimage_uc_icon = '';
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
@@ -149,8 +149,7 @@  discard block
 block discarded – undo
149 149
 			{
150 150
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
151 151
 			}
152
-		}
153
-		else
152
+		} else
154 153
 		{
155 154
 			$album = $this->album->get_info($album_id);
156 155
 			if (!$this->gallery_auth->acl_check('m_', $album['album_id'], $album['album_user_id']))
@@ -211,8 +210,7 @@  discard block
 block discarded – undo
211 210
 			{
212 211
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
213 212
 			}
214
-		}
215
-		else
213
+		} else
216 214
 		{
217 215
 			$album = $this->album->get_info($album_id);
218 216
 			if (!$this->gallery_auth->acl_check('m_status', $album['album_id'], $album['album_user_id']))
@@ -257,8 +255,7 @@  discard block
 block discarded – undo
257 255
 					$this->url->meta_refresh(3, $back_link);
258 256
 					trigger_error($message);
259 257
 				}
260
-			}
261
-			else
258
+			} else
262 259
 			{
263 260
 				$s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />';
264 261
 				$s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />';
@@ -307,8 +304,7 @@  discard block
 block discarded – undo
307 304
 			{
308 305
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
309 306
 			}
310
-		}
311
-		else
307
+		} else
312 308
 		{
313 309
 			$album = $this->album->get_info($album_id);
314 310
 			if (!$this->gallery_auth->acl_check('m_', $album['album_id'], $album['album_user_id']))
@@ -358,8 +354,7 @@  discard block
 block discarded – undo
358 354
 				$message = $this->language->lang('WAITING_REPORTED_DONE', count($report_ary));
359 355
 				$this->url->meta_refresh(3, $back_link);
360 356
 				trigger_error($message);
361
-			}
362
-			else
357
+			} else
363 358
 			{
364 359
 				$s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />';
365 360
 				$s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />';
@@ -379,8 +374,7 @@  discard block
 block discarded – undo
379 374
 			{
380 375
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
381 376
 			}
382
-		}
383
-		else
377
+		} else
384 378
 		{
385 379
 			$album = $this->album->get_info($album_id);
386 380
 			if (!$this->gallery_auth->acl_check('m_report', $album['album_id'], $album['album_user_id']))
@@ -470,8 +464,7 @@  discard block
 block discarded – undo
470 464
 					$this->url->meta_refresh(3, $back_link);
471 465
 					trigger_error($message);
472 466
 				}
473
-			}
474
-			else
467
+			} else
475 468
 			{
476 469
 				$s_hidden_fields = '<input type="hidden" name="select_action" value="' . $action . '" />';
477 470
 				$s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />';
@@ -492,8 +485,7 @@  discard block
 block discarded – undo
492 485
 						'S_HIDDEN_FIELDS'	=> $s_hidden_fields,
493 486
 					));
494 487
 					return $this->helper->render('gallery/mcp_body.html', $this->language->lang('GALLERY'));
495
-				}
496
-				else
488
+				} else
497 489
 				{
498 490
 					confirm_box(false, $this->language->lang('QUEUES_A_' . strtoupper($action) . '2_CONFIRM'), $s_hidden_fields);
499 491
 				}
@@ -508,8 +500,7 @@  discard block
 block discarded – undo
508 500
 			{
509 501
 				$this->misc->not_authorised($album_backlink, $album_loginlink, 'LOGIN_EXPLAIN_UPLOAD');
510 502
 			}
511
-		}
512
-		else
503
+		} else
513 504
 		{
514 505
 			$album = $this->album->get_info($album_id);
515 506
 			if (!$this->gallery_auth->acl_check('m_', $album['album_id'], $album['album_user_id']))
@@ -583,8 +574,7 @@  discard block
 block discarded – undo
583 574
 					$message = $this->language->lang('WAITING_REPORTED_DONE', 1);
584 575
 					$this->url->meta_refresh(3, $back_link);
585 576
 					trigger_error($message);
586
-				}
587
-				else
577
+				} else
588 578
 				{
589 579
 					$s_hidden_fields = '<input type="hidden" name="action" value="reports_close" />';
590 580
 					confirm_box(false, $this->language->lang('REPORT_A_CLOSE2_CONFIRM'), $s_hidden_fields);
@@ -626,8 +616,7 @@  discard block
 block discarded – undo
626 616
 			{
627 617
 				$select_select .= '<option value="images_unapprove">' . $this->language->lang('QUEUE_A_UNAPPROVE') . '</option>';
628 618
 				$select_select .= '<option value="images_lock">' . $this->language->lang('QUEUE_A_LOCK') . '</option>';
629
-			}
630
-			else
619
+			} else
631 620
 			{
632 621
 				$select_select .= '<option value="images_approve">' . $this->language->lang('QUEUE_A_APPROVE') . '</option>';
633 622
 				$select_select .= '<option value="images_unapprove">' . $this->language->lang('QUEUE_A_UNAPPROVE') . '</option>';
@@ -646,8 +635,7 @@  discard block
 block discarded – undo
646 635
 			if ($open_report)
647 636
 			{
648 637
 				$select_select .= '<option value="reports_close">' . $this->language->lang('REPORT_A_CLOSE') . '</option>';
649
-			}
650
-			else
638
+			} else
651 639
 			{
652 640
 				$select_select .= '<option value="reports_open">' . $this->language->lang('REPORT_A_OPEN') . '</option>';
653 641
 			}
@@ -729,8 +717,7 @@  discard block
 block discarded – undo
729 717
 			));
730 718
 			return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY'));
731 719
 			//trigger_error($message);
732
-		}
733
-		else
720
+		} else
734 721
 		{
735 722
 			$this->template->assign_vars(array(
736 723
 				'S_NOTIFY_POSTER'			=> $show_notify,
@@ -779,8 +766,7 @@  discard block
 block discarded – undo
779 766
 			$message = sprintf($this->language->lang('WAITING_UNAPPROVED_IMAGE', 1));
780 767
 			meta_refresh($meta_refresh_time, $image_backlink);
781 768
 			trigger_error($message);
782
-		}
783
-		else
769
+		} else
784 770
 		{
785 771
 			$s_hidden_fields = '';
786 772
 			confirm_box(false, 'QUEUE_A_UNAPPROVE2', $s_hidden_fields);
@@ -821,8 +807,7 @@  discard block
 block discarded – undo
821 807
 			$this->album->update_info($moving_target);
822 808
 			meta_refresh($meta_refresh_time, $image_backlink);
823 809
 			trigger_error($message);
824
-		}
825
-		else
810
+		} else
826 811
 		{
827 812
 			$category_select = $this->album->get_albumbox(false, 'moving_target', $album_id, 'm_move', $album_id);
828 813
 			$this->template->assign_vars(array(
@@ -866,8 +851,7 @@  discard block
 block discarded – undo
866 851
 			$message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE',1));
867 852
 			meta_refresh($meta_refresh_time, $image_backlink);
868 853
 			trigger_error($message);
869
-		}
870
-		else
854
+		} else
871 855
 		{
872 856
 			$s_hidden_fields = '';
873 857
 			confirm_box(false, 'QUEUE_A_LOCK2', $s_hidden_fields);
Please login to merge, or discard this patch.