@@ -133,8 +133,7 @@ discard block |
||
133 | 133 | try |
134 | 134 | { |
135 | 135 | $this->loader->load($album_id); |
136 | - } |
|
137 | - catch (\Exception $e) |
|
136 | + } catch (\Exception $e) |
|
138 | 137 | { |
139 | 138 | throw new \phpbb\exception\http_exception(404, 'ALBUM_NOT_EXIST'); |
140 | 139 | } |
@@ -193,8 +192,7 @@ discard block |
||
193 | 192 | 'phpbbgallery_core_album_upload', |
194 | 193 | array('album_id' => (int) $album_id) |
195 | 194 | )); |
196 | - } |
|
197 | - else |
|
195 | + } else |
|
198 | 196 | { |
199 | 197 | if ($album_data['contest_start'] + $album_data['contest_rating'] > time()) |
200 | 198 | { |
@@ -250,8 +248,7 @@ discard block |
||
250 | 248 | { |
251 | 249 | $image_status_check = ''; |
252 | 250 | $image_counter = $album_data['album_images_real']; |
253 | - } |
|
254 | - else if ($user_id == $album_owner_id) |
|
251 | + } else if ($user_id == $album_owner_id) |
|
255 | 252 | { |
256 | 253 | $image_status_check = " AND (image_status <> " . \phpbbgallery\core\block::STATUS_UNAPPROVED . " OR image_user_id = $user_id)"; |
257 | 254 | $image_counter = $album_data['album_images_real']; |
@@ -260,8 +257,7 @@ discard block |
||
260 | 257 | if (in_array($sort_key, array('r', 'ra'))) |
261 | 258 | { |
262 | 259 | $sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'ASC' : 'DESC'); |
263 | - } |
|
264 | - else |
|
260 | + } else |
|
265 | 261 | { |
266 | 262 | $sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); |
267 | 263 | } |
@@ -484,8 +480,7 @@ discard block |
||
484 | 480 | )); |
485 | 481 | $this->url->meta_refresh(3, $back_link); |
486 | 482 | return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY')); |
487 | - } |
|
488 | - else |
|
483 | + } else |
|
489 | 484 | { |
490 | 485 | $this->notifications_helper->add_albums($album_id); |
491 | 486 | $this->template->assign_vars(array( |
@@ -494,14 +489,12 @@ discard block |
||
494 | 489 | $this->url->meta_refresh(3, $back_link); |
495 | 490 | return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY')); |
496 | 491 | } |
497 | - } |
|
498 | - else |
|
492 | + } else |
|
499 | 493 | { |
500 | 494 | if ($this->notifications_helper->get_watched_album($album_id) == 1) |
501 | 495 | { |
502 | 496 | $lang = $this->language->lang('UNWATCH_ALBUM'); |
503 | - } |
|
504 | - else |
|
497 | + } else |
|
505 | 498 | { |
506 | 499 | $lang = $this->language->lang('WATCH_ALBUM'); |
507 | 500 | } |
@@ -533,8 +526,7 @@ discard block |
||
533 | 526 | if (!$this->user->data['is_registered']) |
534 | 527 | { |
535 | 528 | login_box(); |
536 | - } |
|
537 | - else |
|
529 | + } else |
|
538 | 530 | { |
539 | 531 | //return $this->error('NOT_AUTHORISED', 403); |
540 | 532 | trigger_error($this->language->lang('NOT_AUTHORISED')); |
@@ -250,8 +250,7 @@ discard block |
||
250 | 250 | } |
251 | 251 | |
252 | 252 | $this->loader->load($this->data['image_album_id']); |
253 | - } |
|
254 | - catch (\Exception $e) |
|
253 | + } catch (\Exception $e) |
|
255 | 254 | { |
256 | 255 | throw new \phpbb\exception\http_exception(404, 'INVALID_IMAGE'); |
257 | 256 | } |
@@ -264,8 +263,7 @@ discard block |
||
264 | 263 | if ($this->gallery_auth->acl_check('m_status', $album_id, $album_data['album_user_id'])) |
265 | 264 | { |
266 | 265 | $image_status_check = ''; |
267 | - } |
|
268 | - else |
|
266 | + } else |
|
269 | 267 | { |
270 | 268 | $user_id = (int) $this->user->data['user_id']; |
271 | 269 | $image_status_check = ' AND (image_status = ' . \phpbbgallery\core\block::STATUS_APPROVED . ' OR image_user_id = ' . $user_id . ')'; |
@@ -322,8 +320,7 @@ discard block |
||
322 | 320 | if (in_array($sort_key, array('r', 'ra'))) |
323 | 321 | { |
324 | 322 | $sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'ASC' : 'DESC'); |
325 | - } |
|
326 | - else |
|
323 | + } else |
|
327 | 324 | { |
328 | 325 | $sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); |
329 | 326 | } |
@@ -551,8 +548,7 @@ discard block |
||
551 | 548 | if (isset($album_data['contest_start'])) |
552 | 549 | { |
553 | 550 | $s_hide_comment_input = (time() < ($album_data['contest_start'] + $album_data['contest_end'])) ? true : false; |
554 | - } |
|
555 | - else |
|
551 | + } else |
|
556 | 552 | { |
557 | 553 | $s_hide_comment_input = false; |
558 | 554 | } |
@@ -598,8 +594,7 @@ discard block |
||
598 | 594 | //$this->template->assign_var('S_COMMENT_ACTION', append_sid($this->url->path('full') . 'comment/' . $image_id . '/add/0')); |
599 | 595 | $this->template->assign_var('S_COMMENT_ACTION', $this->helper->route('phpbbgallery_core_comment_add', array('image_id' => $image_id, 'comment_id' => 0))); |
600 | 596 | } |
601 | - } |
|
602 | - else if ($this->gallery_config->get('comment_user_control') && !$image_data['image_allow_comments']) |
|
597 | + } else if ($this->gallery_config->get('comment_user_control') && !$image_data['image_allow_comments']) |
|
603 | 598 | { |
604 | 599 | $this->template->assign_var('S_COMMENTS_DISABLED', true); |
605 | 600 | } |
@@ -790,8 +785,7 @@ discard block |
||
790 | 785 | 'NAME' => $field_data['PROFILE_FIELD_NAME'], |
791 | 786 | 'U_CONTACT' => $field_data['PROFILE_FIELD_CONTACT'], |
792 | 787 | )); |
793 | - } |
|
794 | - else |
|
788 | + } else |
|
795 | 789 | { |
796 | 790 | $this->template->assign_block_vars('commentrow.custom_fields', $field_data); |
797 | 791 | } |
@@ -917,8 +911,7 @@ discard block |
||
917 | 911 | { |
918 | 912 | $change_image_count = true; |
919 | 913 | } |
920 | - } |
|
921 | - else if ($this->request->variable('change_author', '', true)) |
|
914 | + } else if ($this->request->variable('change_author', '', true)) |
|
922 | 915 | { |
923 | 916 | $errors[] = $this->language->lang('INVALID_USERNAME'); |
924 | 917 | } |
@@ -939,8 +932,7 @@ discard block |
||
939 | 932 | { |
940 | 933 | $personal_album_id = $this->album->generate_personal_album($image_data['image_username'], $image_data['image_user_id'], $image_data['image_user_colour'], $image_user); |
941 | 934 | } |
942 | - } |
|
943 | - else |
|
935 | + } else |
|
944 | 936 | { |
945 | 937 | $personal_album_id = $this->gallery_user->get_data('personal_album_id'); |
946 | 938 | if (!$personal_album_id && $this->gallery_auth->acl_check('i_upload', $this->gallery_auth->get_own_album())) |
@@ -1108,8 +1100,7 @@ discard block |
||
1108 | 1100 | $this->notification_helper->read('approval', $album_id); |
1109 | 1101 | $this->url->meta_refresh(3, $album_backlink); |
1110 | 1102 | trigger_error($message); |
1111 | - } |
|
1112 | - else |
|
1103 | + } else |
|
1113 | 1104 | { |
1114 | 1105 | if (isset($_POST['cancel'])) |
1115 | 1106 | { |
@@ -1117,8 +1108,7 @@ discard block |
||
1117 | 1108 | $message .= '<br />' . sprintf($this->language->lang('CLICK_RETURN_IMAGE'), '<a href="' . $image_backlink . '">', '</a>'); |
1118 | 1109 | $this->url->meta_refresh(3, $image_backlink); |
1119 | 1110 | trigger_error($message); |
1120 | - } |
|
1121 | - else |
|
1111 | + } else |
|
1122 | 1112 | { |
1123 | 1113 | confirm_box(false, 'DELETE_IMAGE2', $s_hidden_fields); |
1124 | 1114 | } |
@@ -1223,8 +1213,7 @@ discard block |
||
1223 | 1213 | { |
1224 | 1214 | // @todo Add "redirect after login" url |
1225 | 1215 | login_box(); |
1226 | - } |
|
1227 | - else |
|
1216 | + } else |
|
1228 | 1217 | { |
1229 | 1218 | //return $this->error('NOT_AUTHORISED', 403); |
1230 | 1219 | redirect('gallery/album/' . $album_id); |