Passed
Push — master ( 4c9f6d...9f98fb )
by Stanislav
03:51 queued 01:00
created
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 1 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 1 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.
core/notification.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -244,8 +244,7 @@
 block discarded – undo
244 244
 		if (is_array($ids))
245 245
 		{
246 246
 			return array_map('intval', $ids);
247
-		}
248
-		else
247
+		} else
249 248
 		{
250 249
 			return array((int) $ids);
251 250
 		}
Please login to merge, or discard this patch.
core/notification/helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -244,8 +244,7 @@
 block discarded – undo
244 244
 		if (is_array($ids))
245 245
 		{
246 246
 			return array_map('intval', $ids);
247
-		}
248
-		else
247
+		} else
249 248
 		{
250 249
 			return array((int) $ids);
251 250
 		}
Please login to merge, or discard this patch.
core/controller/album.php 1 patch
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.
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.
core/controller/image.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -245,8 +245,7 @@  discard block
 block discarded – undo
245 245
 			}
246 246
 
247 247
 			$this->loader->load($this->data['image_album_id']);
248
-		}
249
-		catch (\Exception $e)
248
+		} catch (\Exception $e)
250 249
 		{
251 250
 			throw new \phpbb\exception\http_exception(404, 'INVALID_IMAGE');
252 251
 		}
@@ -306,8 +305,7 @@  discard block
 block discarded – undo
306 305
 		if (in_array($sort_key, array('r', 'ra')))
307 306
 		{
308 307
 			$sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'ASC' : 'DESC');
309
-		}
310
-		else
308
+		} else
311 309
 		{
312 310
 			$sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
313 311
 		}
@@ -532,8 +530,7 @@  discard block
 block discarded – undo
532 530
 			if (isset($album_data['contest_start']))
533 531
 			{
534 532
 				$s_hide_comment_input = (time() < ($album_data['contest_start'] + $album_data['contest_end'])) ? true : false;
535
-			}
536
-			else
533
+			} else
537 534
 			{
538 535
 				$s_hide_comment_input = false;
539 536
 			}
@@ -580,8 +577,7 @@  discard block
 block discarded – undo
580 577
 				//$this->template->assign_var('S_COMMENT_ACTION', append_sid($this->url->path('full') . 'comment/' . $image_id . '/add/0'));
581 578
 				$this->template->assign_var('S_COMMENT_ACTION', $this->helper->route('phpbbgallery_core_comment_add', array('image_id' => $image_id, 'comment_id' => 0)));
582 579
 			}
583
-		}
584
-		else if ($this->gallery_config->get('comment_user_control') && !$image_data['image_allow_comments'])
580
+		} else if ($this->gallery_config->get('comment_user_control') && !$image_data['image_allow_comments'])
585 581
 		{
586 582
 			$this->template->assign_var('S_COMMENTS_DISABLED', true);
587 583
 		}
@@ -772,8 +768,7 @@  discard block
 block discarded – undo
772 768
 								'NAME'      => $field_data['PROFILE_FIELD_NAME'],
773 769
 								'U_CONTACT' => $field_data['PROFILE_FIELD_CONTACT'],
774 770
 							));
775
-						}
776
-						else
771
+						} else
777 772
 						{
778 773
 							$this->template->assign_block_vars('commentrow.custom_fields', $field_data);
779 774
 						}
@@ -901,8 +896,7 @@  discard block
 block discarded – undo
901 896
 					{
902 897
 						$change_image_count = true;
903 898
 					}
904
-				}
905
-				else if ($this->request->variable('change_author', '', true))
899
+				} else if ($this->request->variable('change_author', '', true))
906 900
 				{
907 901
 					$errors[] = $this->language->lang('INVALID_USERNAME');
908 902
 				}
@@ -923,8 +917,7 @@  discard block
 block discarded – undo
923 917
 					{
924 918
 						$personal_album_id = $this->album->generate_personal_album($image_data['image_username'], $image_data['image_user_id'], $image_data['image_user_colour'], $image_user);
925 919
 					}
926
-				}
927
-				else
920
+				} else
928 921
 				{
929 922
 					$personal_album_id = $this->gallery_user->get_data('personal_album_id');
930 923
 					if (!$personal_album_id && $this->gallery_auth->acl_check('i_upload', $this->gallery_auth->get_own_album()))
@@ -1092,8 +1085,7 @@  discard block
 block discarded – undo
1092 1085
 			$this->notification_helper->read('approval', $album_id);
1093 1086
 			$this->url->meta_refresh(3, $album_backlink);
1094 1087
 			trigger_error($message);
1095
-		}
1096
-		else
1088
+		} else
1097 1089
 		{
1098 1090
 			if (isset($_POST['cancel']))
1099 1091
 			{
@@ -1101,8 +1093,7 @@  discard block
 block discarded – undo
1101 1093
 				$message .= '<br />' . sprintf($this->language->lang('CLICK_RETURN_IMAGE'), '<a href="' . $image_backlink . '">', '</a>');
1102 1094
 				$this->url->meta_refresh(3, $image_backlink);
1103 1095
 				trigger_error($message);
1104
-			}
1105
-			else
1096
+			} else
1106 1097
 			{
1107 1098
 				confirm_box(false, 'DELETE_IMAGE2', $s_hidden_fields);
1108 1099
 			}
@@ -1207,8 +1198,7 @@  discard block
 block discarded – undo
1207 1198
 			{
1208 1199
 				// @todo Add "redirect after login" url
1209 1200
 				login_box();
1210
-			}
1211
-			else
1201
+			} else
1212 1202
 			{
1213 1203
 				//return $this->error('NOT_AUTHORISED', 403);
1214 1204
 				redirect('/gallery/album/' . $album_id);
Please login to merge, or discard this patch.