@@ -85,8 +85,7 @@ discard block |
||
| 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 |
||
| 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( |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | } |
| 261 | 261 | else |
| 262 | 262 | { |
| 263 | - $s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />'; |
|
| 263 | + $s_hidden_fields = '<input type="hidden" name="action[' . $action . ']" value="' . $action . '" />'; |
|
| 264 | 264 | $s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />'; |
| 265 | 265 | foreach ($approve_ary as $id => $var) |
| 266 | 266 | { |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | } |
| 362 | 362 | else |
| 363 | 363 | { |
| 364 | - $s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />'; |
|
| 364 | + $s_hidden_fields = '<input type="hidden" name="action[' . $action . ']" value="' . $action . '" />'; |
|
| 365 | 365 | $s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />'; |
| 366 | 366 | foreach ($report_ary as $var) |
| 367 | 367 | { |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | case 'reports_close': |
| 584 | 584 | if (confirm_box(true)) |
| 585 | 585 | { |
| 586 | - $back_link = $this->helper->route('phpbbgallery_core_moderate_image', array('image_id' => $image_id)); |
|
| 586 | + $back_link = $this->helper->route('phpbbgallery_core_moderate_image', array('image_id' => $image_id)); |
|
| 587 | 587 | $this->report->close_reports_by_image($image_id); |
| 588 | 588 | $message = $this->language->lang('WAITING_REPORTED_DONE', 1); |
| 589 | 589 | $this->url->meta_refresh(3, $back_link); |
@@ -679,7 +679,7 @@ discard block |
||
| 679 | 679 | 'REPORT_TIME' => $this->user->format_date($var['report_time']), |
| 680 | 680 | 'REPORT_NOTE' => $var['report_note'], |
| 681 | 681 | 'STATUS' => $var['report_status'], |
| 682 | - 'MANAGER' => $var['report_manager'] != 0 ? $this->user_loader->get_username($var['report_manager'], 'full') : false, |
|
| 682 | + 'MANAGER' => $var['report_manager'] != 0 ? $this->user_loader->get_username($var['report_manager'], 'full') : false, |
|
| 683 | 683 | )); |
| 684 | 684 | } |
| 685 | 685 | return $this->helper->render('gallery/moderate_image_overview.html', $this->language->lang('GALLERY')); |
@@ -804,7 +804,7 @@ discard block |
||
| 804 | 804 | $image_data = $this->image->get_image_data($image_id); |
| 805 | 805 | $album_id = $image_data['image_album_id']; |
| 806 | 806 | //$user_id = $image_data['image_user_id']; |
| 807 | - $album_data = $this->album->get_info($album_id); |
|
| 807 | + $album_data = $this->album->get_info($album_id); |
|
| 808 | 808 | $album_backlink = $this->helper->route('phpbbgallery_core_album', array('album_id' => $album_id)); |
| 809 | 809 | $image_backlink = $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id)); |
| 810 | 810 | $album_loginlink = append_sid($this->root_path . 'ucp.' . $this->php_ext . '?mode=login'); |
@@ -852,7 +852,7 @@ discard block |
||
| 852 | 852 | $image_data = $this->image->get_image_data($image_id); |
| 853 | 853 | $album_id = $image_data['image_album_id']; |
| 854 | 854 | //$user_id = $image_data['image_user_id']; |
| 855 | - $album_data = $this->album->get_info($album_id); |
|
| 855 | + $album_data = $this->album->get_info($album_id); |
|
| 856 | 856 | $album_backlink = $this->helper->route('phpbbgallery_core_album', array('album_id' => $album_id)); |
| 857 | 857 | $image_backlink = $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id)); |
| 858 | 858 | $album_loginlink = append_sid($this->root_path . 'ucp.' . $this->php_ext . '?mode=login'); |
@@ -868,7 +868,7 @@ discard block |
||
| 868 | 868 | $image_id_ary = array($image_id); |
| 869 | 869 | $this->image->lock_images($image_id_ary, $album_data['album_id']); |
| 870 | 870 | // To DO - add notification |
| 871 | - $message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE',1)); |
|
| 871 | + $message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE', 1)); |
|
| 872 | 872 | meta_refresh($meta_refresh_time, $image_backlink); |
| 873 | 873 | trigger_error($message); |
| 874 | 874 | } |
@@ -149,8 +149,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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); |
@@ -621,13 +611,11 @@ discard block |
||
| 621 | 611 | { |
| 622 | 612 | $select_select .= '<option value="images_approve">' . $this->language->lang('QUEUE_A_APPROVE') . '</option>'; |
| 623 | 613 | $select_select .= '<option value="images_lock">' . $this->language->lang('QUEUE_A_LOCK') . '</option>'; |
| 624 | - } |
|
| 625 | - else if ($image_data['image_status'] == 1) |
|
| 614 | + } else if ($image_data['image_status'] == 1) |
|
| 626 | 615 | { |
| 627 | 616 | $select_select .= '<option value="images_unapprove">' . $this->language->lang('QUEUE_A_UNAPPROVE') . '</option>'; |
| 628 | 617 | $select_select .= '<option value="images_lock">' . $this->language->lang('QUEUE_A_LOCK') . '</option>'; |
| 629 | - } |
|
| 630 | - else |
|
| 618 | + } else |
|
| 631 | 619 | { |
| 632 | 620 | $select_select .= '<option value="images_approve">' . $this->language->lang('QUEUE_A_APPROVE') . '</option>'; |
| 633 | 621 | $select_select .= '<option value="images_unapprove">' . $this->language->lang('QUEUE_A_UNAPPROVE') . '</option>'; |
@@ -646,8 +634,7 @@ discard block |
||
| 646 | 634 | if ($open_report) |
| 647 | 635 | { |
| 648 | 636 | $select_select .= '<option value="reports_close">' . $this->language->lang('REPORT_A_CLOSE') . '</option>'; |
| 649 | - } |
|
| 650 | - else |
|
| 637 | + } else |
|
| 651 | 638 | { |
| 652 | 639 | $select_select .= '<option value="reports_open">' . $this->language->lang('REPORT_A_OPEN') . '</option>'; |
| 653 | 640 | } |
@@ -725,8 +712,7 @@ discard block |
||
| 725 | 712 | $message = $this->language->lang('WAITING_APPROVED_IMAGE', 1); |
| 726 | 713 | meta_refresh($meta_refresh_time, $image_backlink); |
| 727 | 714 | trigger_error($message); |
| 728 | - } |
|
| 729 | - else |
|
| 715 | + } else |
|
| 730 | 716 | { |
| 731 | 717 | $this->template->assign_vars(array( |
| 732 | 718 | 'S_NOTIFY_POSTER' => $show_notify, |
@@ -775,8 +761,7 @@ discard block |
||
| 775 | 761 | $message = sprintf($this->language->lang('WAITING_UNAPPROVED_IMAGE', 1)); |
| 776 | 762 | meta_refresh($meta_refresh_time, $image_backlink); |
| 777 | 763 | trigger_error($message); |
| 778 | - } |
|
| 779 | - else |
|
| 764 | + } else |
|
| 780 | 765 | { |
| 781 | 766 | $s_hidden_fields = ''; |
| 782 | 767 | confirm_box(false, 'QUEUE_A_UNAPPROVE2', $s_hidden_fields); |
@@ -817,8 +802,7 @@ discard block |
||
| 817 | 802 | $this->album->update_info($moving_target); |
| 818 | 803 | meta_refresh($meta_refresh_time, $image_backlink); |
| 819 | 804 | trigger_error($message); |
| 820 | - } |
|
| 821 | - else |
|
| 805 | + } else |
|
| 822 | 806 | { |
| 823 | 807 | $category_select = $this->album->get_albumbox(false, 'moving_target', $album_id, 'm_move', $album_id); |
| 824 | 808 | $this->template->assign_vars(array( |
@@ -862,8 +846,7 @@ discard block |
||
| 862 | 846 | $message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE',1)); |
| 863 | 847 | meta_refresh($meta_refresh_time, $image_backlink); |
| 864 | 848 | trigger_error($message); |
| 865 | - } |
|
| 866 | - else |
|
| 849 | + } else |
|
| 867 | 850 | { |
| 868 | 851 | $s_hidden_fields = ''; |
| 869 | 852 | confirm_box(false, 'QUEUE_A_LOCK2', $s_hidden_fields); |
@@ -363,8 +363,7 @@ discard block |
||
| 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 |
||
| 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); |
@@ -190,13 +190,13 @@ discard block |
||
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | /** |
| 193 | - * Event delete images |
|
| 194 | - * |
|
| 195 | - * @event phpbbgallery.core.image.delete_images |
|
| 196 | - * @var array images array of the image ids we are deleting |
|
| 197 | - * @var array filenames array of the image filenames |
|
| 198 | - * @since 1.2.0 |
|
| 199 | - */ |
|
| 193 | + * Event delete images |
|
| 194 | + * |
|
| 195 | + * @event phpbbgallery.core.image.delete_images |
|
| 196 | + * @var array images array of the image ids we are deleting |
|
| 197 | + * @var array filenames array of the image filenames |
|
| 198 | + * @since 1.2.0 |
|
| 199 | + */ |
|
| 200 | 200 | $vars = array('images', 'filenames'); |
| 201 | 201 | extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.image.delete_images', compact($vars))); |
| 202 | 202 | |
@@ -256,11 +256,11 @@ discard block |
||
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | /** |
| 259 | - * Get the real filenames, so we can load/delete/edit the image-file. |
|
| 260 | - * |
|
| 261 | - * @param mixed $images Array or integer with the image_id(s) |
|
| 262 | - * @return array Format: $image_id => $filename |
|
| 263 | - */ |
|
| 259 | + * Get the real filenames, so we can load/delete/edit the image-file. |
|
| 260 | + * |
|
| 261 | + * @param mixed $images Array or integer with the image_id(s) |
|
| 262 | + * @return array Format: $image_id => $filename |
|
| 263 | + */ |
|
| 264 | 264 | public function get_filenames($images) |
| 265 | 265 | { |
| 266 | 266 | if (empty($images)) |
@@ -375,13 +375,13 @@ discard block |
||
| 375 | 375 | $tpl = '{CONTENT}'; |
| 376 | 376 | |
| 377 | 377 | /** |
| 378 | - * Event generate link |
|
| 379 | - * |
|
| 380 | - * @event phpbbgallery.core.image.generate_link |
|
| 381 | - * @var string mode type of link |
|
| 382 | - * @var string tpl html to be outputted |
|
| 383 | - * @since 1.2.0 |
|
| 384 | - */ |
|
| 378 | + * Event generate link |
|
| 379 | + * |
|
| 380 | + * @event phpbbgallery.core.image.generate_link |
|
| 381 | + * @var string mode type of link |
|
| 382 | + * @var string tpl html to be outputted |
|
| 383 | + * @since 1.2.0 |
|
| 384 | + */ |
|
| 385 | 385 | $vars = array('mode', 'tpl'); |
| 386 | 386 | extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.image.generate_link', compact($vars)));//@todo: Correctly identify the event |
| 387 | 387 | break; |
@@ -391,12 +391,12 @@ discard block |
||
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 | /** |
| 394 | - * Handle user- & total image_counter |
|
| 395 | - * |
|
| 396 | - * @param array $image_id_ary array with the image_ids which changed their status |
|
| 397 | - * @param bool $add are we adding or removing the images |
|
| 398 | - * @param bool $readd is it possible that there are images which aren't really changed |
|
| 399 | - */ |
|
| 394 | + * Handle user- & total image_counter |
|
| 395 | + * |
|
| 396 | + * @param array $image_id_ary array with the image_ids which changed their status |
|
| 397 | + * @param bool $add are we adding or removing the images |
|
| 398 | + * @param bool $readd is it possible that there are images which aren't really changed |
|
| 399 | + */ |
|
| 400 | 400 | public function handle_counter($image_id_ary, $add, $readd = false) |
| 401 | 401 | { |
| 402 | 402 | if (empty($image_id_ary)) |
@@ -467,11 +467,11 @@ discard block |
||
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | /** |
| 470 | - * Approve image |
|
| 471 | - * @param (array) $image_id_ary The image ID array to be approved |
|
| 472 | - * @param (int) $album_id The album image is approved to (just save some queries for log) |
|
| 473 | - * return 0 on success |
|
| 474 | - */ |
|
| 470 | + * Approve image |
|
| 471 | + * @param (array) $image_id_ary The image ID array to be approved |
|
| 472 | + * @param (int) $album_id The album image is approved to (just save some queries for log) |
|
| 473 | + * return 0 on success |
|
| 474 | + */ |
|
| 475 | 475 | public function approve_images($image_id_ary, $album_id) |
| 476 | 476 | { |
| 477 | 477 | $sql = 'SELECT image_id, image_name, image_user_id |
@@ -507,10 +507,10 @@ discard block |
||
| 507 | 507 | } |
| 508 | 508 | |
| 509 | 509 | /** |
| 510 | - * UnApprove image |
|
| 511 | - * @param (array) $image_id_ary The image ID array to be unapproved |
|
| 512 | - * @param (int) $album_id The album image is approved to (just save some queries for log) |
|
| 513 | - */ |
|
| 510 | + * UnApprove image |
|
| 511 | + * @param (array) $image_id_ary The image ID array to be unapproved |
|
| 512 | + * @param (int) $album_id The album image is approved to (just save some queries for log) |
|
| 513 | + */ |
|
| 514 | 514 | public function unapprove_images($image_id_ary, $album_id) |
| 515 | 515 | { |
| 516 | 516 | self::handle_counter($image_id_ary, false); |
@@ -563,10 +563,10 @@ discard block |
||
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | /** |
| 566 | - * Lock images |
|
| 567 | - * @param (array) $image_id_ary Array of images we want to lock |
|
| 568 | - * @param (int) $album_id Album id, so we can log the action |
|
| 569 | - */ |
|
| 566 | + * Lock images |
|
| 567 | + * @param (array) $image_id_ary Array of images we want to lock |
|
| 568 | + * @param (int) $album_id Album id, so we can log the action |
|
| 569 | + */ |
|
| 570 | 570 | public function lock_images($image_id_ary, $album_id) |
| 571 | 571 | { |
| 572 | 572 | self::handle_counter($image_id_ary, false); |
@@ -590,9 +590,9 @@ discard block |
||
| 590 | 590 | } |
| 591 | 591 | |
| 592 | 592 | /** |
| 593 | - * Get last image id |
|
| 594 | - * Return (int) image_id |
|
| 595 | - **/ |
|
| 593 | + * Get last image id |
|
| 594 | + * Return (int) image_id |
|
| 595 | + **/ |
|
| 596 | 596 | public function get_last_image() |
| 597 | 597 | { |
| 598 | 598 | $this->gallery_auth->load_user_permissions($this->user->data['user_id']); |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | * @since 1.2.0 |
| 384 | 384 | */ |
| 385 | 385 | $vars = array('mode', 'tpl'); |
| 386 | - extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.image.generate_link', compact($vars)));//@todo: Correctly identify the event |
|
| 386 | + extract($this->phpbb_dispatcher->trigger_event('phpbbgallery.core.image.generate_link', compact($vars))); //@todo: Correctly identify the event |
|
| 387 | 387 | break; |
| 388 | 388 | } |
| 389 | 389 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | |
| 407 | 407 | $num_images = $num_comments = 0; |
| 408 | 408 | $sql = 'SELECT SUM(image_comments) as comments |
| 409 | - FROM ' . $this->table_images .' |
|
| 409 | + FROM ' . $this->table_images . ' |
|
| 410 | 410 | WHERE image_status ' . (($readd) ? '=' : '<>') . ' ' . (int) \phpbbgallery\core\block::STATUS_UNAPPROVED . ' |
| 411 | 411 | AND ' . $this->db->sql_in_set('image_id', $image_id_ary) . ' |
| 412 | 412 | GROUP BY image_user_id'; |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | $this->db->sql_freeresult($result); |
| 416 | 416 | |
| 417 | 417 | $sql = 'SELECT COUNT(image_id) images, image_user_id |
| 418 | - FROM ' . $this->table_images .' |
|
| 418 | + FROM ' . $this->table_images . ' |
|
| 419 | 419 | WHERE image_status ' . (($readd) ? '=' : '<>') . ' ' . (int) \phpbbgallery\core\block::STATUS_UNAPPROVED . ' |
| 420 | 420 | AND ' . $this->db->sql_in_set('image_id', $image_id_ary) . ' |
| 421 | 421 | GROUP BY image_user_id'; |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | return; |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | - $sql = 'SELECT * FROM ' . $this->table_images .' WHERE image_id = ' . (int) $image_id; |
|
| 458 | + $sql = 'SELECT * FROM ' . $this->table_images . ' WHERE image_id = ' . (int) $image_id; |
|
| 459 | 459 | $result = $this->db->sql_query($sql); |
| 460 | 460 | $row = $this->db->sql_fetchrow($result); |
| 461 | 461 | $this->db->sql_freeresult($result); |
@@ -515,14 +515,14 @@ discard block |
||
| 515 | 515 | { |
| 516 | 516 | self::handle_counter($image_id_ary, false); |
| 517 | 517 | |
| 518 | - $sql = 'UPDATE ' . $this->table_images .' |
|
| 518 | + $sql = 'UPDATE ' . $this->table_images . ' |
|
| 519 | 519 | SET image_status = ' . (int) \phpbbgallery\core\block::STATUS_UNAPPROVED . ' |
| 520 | 520 | WHERE image_status <> ' . (int) \phpbbgallery\core\block::STATUS_ORPHAN . ' |
| 521 | 521 | AND ' . $this->db->sql_in_set('image_id', $image_id_ary); |
| 522 | 522 | $this->db->sql_query($sql); |
| 523 | 523 | |
| 524 | 524 | $sql = 'SELECT image_id, image_name |
| 525 | - FROM ' . $this->table_images .' |
|
| 525 | + FROM ' . $this->table_images . ' |
|
| 526 | 526 | WHERE image_status <> ' . (int) \phpbbgallery\core\block::STATUS_ORPHAN . ' |
| 527 | 527 | AND ' . $this->db->sql_in_set('image_id', $image_id_ary); |
| 528 | 528 | $result = $this->db->sql_query($sql); |
@@ -684,14 +684,14 @@ discard block |
||
| 684 | 684 | 'U_USER_IP' => $show_ip && $this->gallery_auth->acl_check('m_status', $image_data['image_album_id'], $image_data['album_user_id']) ? $image_data['image_user_ip'] : false, |
| 685 | 685 | |
| 686 | 686 | 'S_IMAGE_REPORTED' => $image_data['image_reported'], |
| 687 | - 'U_IMAGE_REPORTED' => '',//($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_reported']) : '', |
|
| 687 | + 'U_IMAGE_REPORTED' => '', //($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_reported']) : '', |
|
| 688 | 688 | 'S_STATUS_APPROVED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_APPROVED) ? true : false, |
| 689 | 689 | 'S_STATUS_UNAPPROVED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_UNAPPROVED) ? true : false, |
| 690 | 690 | 'S_STATUS_UNAPPROVED_ACTION' => ($this->gallery_auth->acl_check('m_status', $image_data['image_album_id'], $image_data['album_user_id']) && $image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->helper->route('phpbbgallery_core_moderate_image_approve', array('image_id' => (int) $image_data['image_id'])) : '', |
| 691 | 691 | 'S_STATUS_LOCKED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_LOCKED) ? true : false, |
| 692 | 692 | |
| 693 | 693 | 'U_REPORT' => ($this->gallery_auth->acl_check('m_report', $image_data['image_album_id'], $image_data['album_user_id']) && $image_data['image_reported']) ? '123'/*$this->url->append_sid('mcp', "mode=report_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_reported'])*/ : '', |
| 694 | - 'U_STATUS' => '',//($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_id']) : '', |
|
| 694 | + 'U_STATUS' => '', //($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_id']) : '', |
|
| 695 | 695 | 'L_STATUS' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->language->lang('APPROVE_IMAGE') : (($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_APPROVED) ? $this->language->lang('CHANGE_IMAGE_STATUS') : $this->language->lang('UNLOCK_IMAGE')), |
| 696 | 696 | )); |
| 697 | 697 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * Default value for new users |
| 19 | 19 | */ |
| 20 | - const DEFAULT_DISPLAY = true; |
|
| 20 | + const DEFAULT_DISPLAY = true; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * phpBB will treat the time from the Exif data like UTC. |
@@ -26,13 +26,13 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * Offset must be set in seconds. |
| 28 | 28 | */ |
| 29 | - const TIME_OFFSET = 0; |
|
| 29 | + const TIME_OFFSET = 0; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Constants for the status of the Exif data. |
| 33 | 33 | */ |
| 34 | - const UNAVAILABLE = 0; |
|
| 35 | - const AVAILABLE = 1; |
|
| 34 | + const UNAVAILABLE = 0; |
|
| 35 | + const AVAILABLE = 1; |
|
| 36 | 36 | const UNKNOWN = 2; |
| 37 | 37 | const DBSAVED = 3; |
| 38 | 38 | |
@@ -44,28 +44,28 @@ discard block |
||
| 44 | 44 | /** |
| 45 | 45 | * Exif data array with all allowed groups and keys. |
| 46 | 46 | */ |
| 47 | - public $data = array(); |
|
| 47 | + public $data = array(); |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * Filtered data array. We don't have empty or invalid values here. |
| 51 | 51 | */ |
| 52 | - public $prepared_data = array(); |
|
| 52 | + public $prepared_data = array(); |
|
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | 55 | * Does the image have exif data? |
| 56 | 56 | * Values see constant declaration at the beginning of the class. |
| 57 | 57 | */ |
| 58 | - public $status = 2; |
|
| 58 | + public $status = 2; |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * Full data array, but serialized to a string |
| 62 | 62 | */ |
| 63 | - public $serialized = ''; |
|
| 63 | + public $serialized = ''; |
|
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * Full link to the image-file |
| 67 | 67 | */ |
| 68 | - public $file = ''; |
|
| 68 | + public $file = ''; |
|
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * Original status of the Exif data. |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | /** |
| 76 | 76 | * Image-ID, just needed to update the Exif status |
| 77 | 77 | */ |
| 78 | - public $image_id = false; |
|
| 78 | + public $image_id = false; |
|
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | 81 | * Constructor |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | } |
| 207 | 207 | else if ($num) |
| 208 | 208 | { |
| 209 | - $exif_exposure = ' 1/' . $den / $num ; |
|
| 209 | + $exif_exposure = ' 1/' . $den / $num; |
|
| 210 | 210 | } |
| 211 | 211 | if ($exif_exposure) |
| 212 | 212 | { |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | } |
| 250 | 250 | if (isset($this->data["EXIF"]["ExposureBiasValue"])) |
| 251 | 251 | { |
| 252 | - list($num,$den) = explode("/", $this->data["EXIF"]["ExposureBiasValue"]); |
|
| 252 | + list($num, $den) = explode("/", $this->data["EXIF"]["ExposureBiasValue"]); |
|
| 253 | 253 | if ($den) |
| 254 | 254 | { |
| 255 | 255 | if (($num / $den) == 0) |
@@ -323,12 +323,12 @@ discard block |
||
| 323 | 323 | * There are lots of possible Exif Groups and Values. |
| 324 | 324 | * But you will never heard of the missing ones. so we just allow the most common ones. |
| 325 | 325 | */ |
| 326 | - static private $allowed_groups = array( |
|
| 326 | + static private $allowed_groups = array( |
|
| 327 | 327 | 'EXIF', |
| 328 | 328 | 'IFD0', |
| 329 | 329 | ); |
| 330 | 330 | |
| 331 | - static private $allowed_keys = array( |
|
| 331 | + static private $allowed_keys = array( |
|
| 332 | 332 | 'DateTimeOriginal', |
| 333 | 333 | 'FocalLength', |
| 334 | 334 | 'ExposureTime', |
@@ -110,8 +110,7 @@ discard block |
||
| 110 | 110 | if ($this->status == self::DBSAVED) |
| 111 | 111 | { |
| 112 | 112 | $this->data = @unserialize($data); |
| 113 | - } |
|
| 114 | - else if (($this->status == self::AVAILABLE) || ($this->status == self::UNKNOWN)) |
|
| 113 | + } else if (($this->status == self::AVAILABLE) || ($this->status == self::UNKNOWN)) |
|
| 115 | 114 | { |
| 116 | 115 | $this->read(); |
| 117 | 116 | } |
@@ -137,8 +136,7 @@ discard block |
||
| 137 | 136 | if (!in_array($key, self::$allowed_groups)) |
| 138 | 137 | { |
| 139 | 138 | unset($this->data[$key]); |
| 140 | - } |
|
| 141 | - else |
|
| 139 | + } else |
|
| 142 | 140 | { |
| 143 | 141 | foreach ($this->data[$key] as $subkey => $array) |
| 144 | 142 | { |
@@ -152,8 +150,7 @@ discard block |
||
| 152 | 150 | |
| 153 | 151 | $this->serialized = serialize($this->data); |
| 154 | 152 | $this->status = self::DBSAVED; |
| 155 | - } |
|
| 156 | - else |
|
| 153 | + } else |
|
| 157 | 154 | { |
| 158 | 155 | $this->status = self::UNAVAILABLE; |
| 159 | 156 | } |
@@ -203,8 +200,7 @@ discard block |
||
| 203 | 200 | if (($num > $den) && $den) |
| 204 | 201 | { |
| 205 | 202 | $exif_exposure = $num / $den; |
| 206 | - } |
|
| 207 | - else if ($num) |
|
| 203 | + } else if ($num) |
|
| 208 | 204 | { |
| 209 | 205 | $exif_exposure = ' 1/' . $den / $num ; |
| 210 | 206 | } |
@@ -255,8 +251,7 @@ discard block |
||
| 255 | 251 | if (($num / $den) == 0) |
| 256 | 252 | { |
| 257 | 253 | $exif_exposure_bias = 0; |
| 258 | - } |
|
| 259 | - else |
|
| 254 | + } else |
|
| 260 | 255 | { |
| 261 | 256 | $exif_exposure_bias = $this->data["EXIF"]["ExposureBiasValue"]; |
| 262 | 257 | } |
@@ -15,74 +15,74 @@ discard block |
||
| 15 | 15 | class exif |
| 16 | 16 | { |
| 17 | 17 | /** |
| 18 | - * Default value for new users |
|
| 19 | - */ |
|
| 18 | + * Default value for new users |
|
| 19 | + */ |
|
| 20 | 20 | const DEFAULT_DISPLAY = true; |
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | - * phpBB will treat the time from the Exif data like UTC. |
|
| 24 | - * If your images were taken with an other timezone, you can insert an offset here. |
|
| 25 | - * The offset is than added to the timestamp before it is converted into the users time. |
|
| 26 | - * |
|
| 27 | - * Offset must be set in seconds. |
|
| 28 | - */ |
|
| 23 | + * phpBB will treat the time from the Exif data like UTC. |
|
| 24 | + * If your images were taken with an other timezone, you can insert an offset here. |
|
| 25 | + * The offset is than added to the timestamp before it is converted into the users time. |
|
| 26 | + * |
|
| 27 | + * Offset must be set in seconds. |
|
| 28 | + */ |
|
| 29 | 29 | const TIME_OFFSET = 0; |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | - * Constants for the status of the Exif data. |
|
| 33 | - */ |
|
| 32 | + * Constants for the status of the Exif data. |
|
| 33 | + */ |
|
| 34 | 34 | const UNAVAILABLE = 0; |
| 35 | 35 | const AVAILABLE = 1; |
| 36 | 36 | const UNKNOWN = 2; |
| 37 | 37 | const DBSAVED = 3; |
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | - * Is the function available? |
|
| 41 | - */ |
|
| 40 | + * Is the function available? |
|
| 41 | + */ |
|
| 42 | 42 | static public $function_exists = null; |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | - * Exif data array with all allowed groups and keys. |
|
| 46 | - */ |
|
| 45 | + * Exif data array with all allowed groups and keys. |
|
| 46 | + */ |
|
| 47 | 47 | public $data = array(); |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | - * Filtered data array. We don't have empty or invalid values here. |
|
| 51 | - */ |
|
| 50 | + * Filtered data array. We don't have empty or invalid values here. |
|
| 51 | + */ |
|
| 52 | 52 | public $prepared_data = array(); |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * Does the image have exif data? |
|
| 56 | - * Values see constant declaration at the beginning of the class. |
|
| 57 | - */ |
|
| 55 | + * Does the image have exif data? |
|
| 56 | + * Values see constant declaration at the beginning of the class. |
|
| 57 | + */ |
|
| 58 | 58 | public $status = 2; |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | - * Full data array, but serialized to a string |
|
| 62 | - */ |
|
| 61 | + * Full data array, but serialized to a string |
|
| 62 | + */ |
|
| 63 | 63 | public $serialized = ''; |
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | - * Full link to the image-file |
|
| 67 | - */ |
|
| 66 | + * Full link to the image-file |
|
| 67 | + */ |
|
| 68 | 68 | public $file = ''; |
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | - * Original status of the Exif data. |
|
| 72 | - */ |
|
| 71 | + * Original status of the Exif data. |
|
| 72 | + */ |
|
| 73 | 73 | public $orig_status = null; |
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | - * Image-ID, just needed to update the Exif status |
|
| 77 | - */ |
|
| 76 | + * Image-ID, just needed to update the Exif status |
|
| 77 | + */ |
|
| 78 | 78 | public $image_id = false; |
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | - * Constructor |
|
| 82 | - * |
|
| 83 | - * @param string $file Full link to the image-file |
|
| 84 | - * @param mixed $image_id False or integer |
|
| 85 | - */ |
|
| 81 | + * Constructor |
|
| 82 | + * |
|
| 83 | + * @param string $file Full link to the image-file |
|
| 84 | + * @param mixed $image_id False or integer |
|
| 85 | + */ |
|
| 86 | 86 | public function __construct($file, $image_id = false) |
| 87 | 87 | { |
| 88 | 88 | if (self::$function_exists === null) |
@@ -98,11 +98,11 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | - * Interpret the values from the database, and read the data if we don't have it. |
|
| 102 | - * |
|
| 103 | - * @param int $status Value of a status constant (see beginning of the class) |
|
| 104 | - * @param mixed $data Either an empty string or the serialized array of the Exif from the database |
|
| 105 | - */ |
|
| 101 | + * Interpret the values from the database, and read the data if we don't have it. |
|
| 102 | + * |
|
| 103 | + * @param int $status Value of a status constant (see beginning of the class) |
|
| 104 | + * @param mixed $data Either an empty string or the serialized array of the Exif from the database |
|
| 105 | + */ |
|
| 106 | 106 | public function interpret($status, $data) |
| 107 | 107 | { |
| 108 | 108 | $this->orig_status = $status; |
@@ -118,8 +118,8 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
| 121 | - * Read Exif data from the image |
|
| 122 | - */ |
|
| 121 | + * Read Exif data from the image |
|
| 122 | + */ |
|
| 123 | 123 | public function read() |
| 124 | 124 | { |
| 125 | 125 | if (!self::$function_exists || !$this->file || !file_exists($this->file)) |
@@ -165,8 +165,8 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
| 168 | - * Validate and prepare the data, so we can send it into the template. |
|
| 169 | - */ |
|
| 168 | + * Validate and prepare the data, so we can send it into the template. |
|
| 169 | + */ |
|
| 170 | 170 | private function prepare_data() |
| 171 | 171 | { |
| 172 | 172 | global $user; |
@@ -273,11 +273,11 @@ discard block |
||
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | /** |
| 276 | - * Sends the Exif into the template |
|
| 277 | - * |
|
| 278 | - * @param bool $expand_view Shall we expand the Exif data on page view or collapse? |
|
| 279 | - * @param string $block Name of the template loop the Exif's are displayed in. |
|
| 280 | - */ |
|
| 276 | + * Sends the Exif into the template |
|
| 277 | + * |
|
| 278 | + * @param bool $expand_view Shall we expand the Exif data on page view or collapse? |
|
| 279 | + * @param string $block Name of the template loop the Exif's are displayed in. |
|
| 280 | + */ |
|
| 281 | 281 | public function send_to_template($expand_view = true, $block = 'exif_value') |
| 282 | 282 | { |
| 283 | 283 | $this->prepare_data(); |
@@ -301,8 +301,8 @@ discard block |
||
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | /** |
| 304 | - * Save the new Exif status in the database |
|
| 305 | - */ |
|
| 304 | + * Save the new Exif status in the database |
|
| 305 | + */ |
|
| 306 | 306 | public function set_status() |
| 307 | 307 | { |
| 308 | 308 | if (!$this->image_id || ($this->orig_status == $this->status)) |
@@ -320,9 +320,9 @@ discard block |
||
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | /** |
| 323 | - * There are lots of possible Exif Groups and Values. |
|
| 324 | - * But you will never heard of the missing ones. so we just allow the most common ones. |
|
| 325 | - */ |
|
| 323 | + * There are lots of possible Exif Groups and Values. |
|
| 324 | + * But you will never heard of the missing ones. so we just allow the most common ones. |
|
| 325 | + */ |
|
| 326 | 326 | static private $allowed_groups = array( |
| 327 | 327 | 'EXIF', |
| 328 | 328 | 'IFD0', |
@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | 'EXIF_CAM_MODEL' => 'Modello Camera', |
| 31 | 31 | 'EXIF_DATE' => 'Immagine scattata il', |
| 32 | 32 | 'EXIF_EXPOSURE' => 'Velocita\' otturatore', |
| 33 | - 'EXIF_EXPOSURE_EXP' => '%s Sec',// 'EXIF_EXPOSURE' unit |
|
| 33 | + 'EXIF_EXPOSURE_EXP' => '%s Sec', // 'EXIF_EXPOSURE' unit |
|
| 34 | 34 | 'EXIF_EXPOSURE_BIAS' => 'Inclinazione di esposizione', |
| 35 | - 'EXIF_EXPOSURE_BIAS_EXP' => '%s EV',// 'EXIF_EXPOSURE_BIAS' unit |
|
| 35 | + 'EXIF_EXPOSURE_BIAS_EXP' => '%s EV', // 'EXIF_EXPOSURE_BIAS' unit |
|
| 36 | 36 | 'EXIF_EXPOSURE_PROG' => 'Programma di esposizione', |
| 37 | 37 | 'EXIF_EXPOSURE_PROG_0' => 'Non definito', |
| 38 | 38 | 'EXIF_EXPOSURE_PROG_1' => 'Manuale', |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | 'EXIF_FLASH_CASE_93' => 'Il flash e\' scattato, modalita\' automatica, luce di ritorno non rilevata, modalita\' riduzione occhi rossi', |
| 73 | 73 | 'EXIF_FLASH_CASE_95' => 'Il flash e\' scattato, modalita\' automatica, luce di ritorno rilevata, modalita\' riduzione occhi rossi', |
| 74 | 74 | 'EXIF_FOCAL' => 'Lunghezza di Focus', |
| 75 | - 'EXIF_FOCAL_EXP' => '%s mm',// 'EXIF_FOCAL' unit |
|
| 75 | + 'EXIF_FOCAL_EXP' => '%s mm', // 'EXIF_FOCAL' unit |
|
| 76 | 76 | 'EXIF_ISO' => 'Valore di velocita\' ISO', |
| 77 | 77 | 'EXIF_METERING_MODE' => 'Modalita\' di metratura', |
| 78 | 78 | 'EXIF_METERING_MODE_0' => 'Sconosciuta', |
@@ -223,14 +223,12 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | $sql = 'SELECT a2.* |
| 98 | 98 | FROM ' . $this->table_albums . ' a1 |
| 99 | - LEFT JOIN ' . $this->table_albums . ' a2 ON (' . $condition .') AND a2.album_user_id = ' . (int) $branch_user_id .' |
|
| 99 | + LEFT JOIN ' . $this->table_albums . ' a2 ON (' . $condition . ') AND a2.album_user_id = ' . (int) $branch_user_id . ' |
|
| 100 | 100 | WHERE a1.album_id = ' . (int) $album_id . ' |
| 101 | 101 | AND a1.album_user_id = ' . (int) $branch_user_id . ' |
| 102 | 102 | ORDER BY a2.left_id ' . (($order == 'descending') ? 'ASC' : 'DESC'); |
@@ -179,9 +179,9 @@ discard block |
||
| 179 | 179 | 'ALBUM_ID' => $album_data['album_id'], |
| 180 | 180 | 'ALBUM_NAME' => $album_data['album_name'], |
| 181 | 181 | 'ALBUM_DESC' => generate_text_for_display($album_data['album_desc'], $album_data['album_desc_uid'], $album_data['album_desc_bitfield'], $album_data['album_desc_options']), |
| 182 | - 'ALBUM_CONTEST_START' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_START' . ((($album_data['contest_start']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start']), false, true)) : '', |
|
| 183 | - 'ALBUM_CONTEST_RATING' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_RATING_START' . ((($album_data['contest_start'] + $album_data['contest_rating']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_rating']), false, true)) : '', |
|
| 184 | - 'ALBUM_CONTEST_END' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_END' . ((($album_data['contest_start'] + $album_data['contest_end']) < time())? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_end']), false, true)) : '', |
|
| 182 | + 'ALBUM_CONTEST_START' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_START' . ((($album_data['contest_start']) < time()) ? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start']), false, true)) : '', |
|
| 183 | + 'ALBUM_CONTEST_RATING' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_RATING_START' . ((($album_data['contest_start'] + $album_data['contest_rating']) < time()) ? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_rating']), false, true)) : '', |
|
| 184 | + 'ALBUM_CONTEST_END' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? $this->language->lang('CONTEST_END' . ((($album_data['contest_start'] + $album_data['contest_end']) < time()) ? 'ED' : 'S'), $this->user->format_date(($album_data['contest_start'] + $album_data['contest_end']), false, true)) : '', |
|
| 185 | 185 | 'U_VIEW_ALBUM' => $this->helper->route('phpbbgallery_core_album', array('album_id' => (int) $album_data['album_id'])), |
| 186 | 186 | )); |
| 187 | 187 | |
@@ -696,9 +696,9 @@ discard block |
||
| 696 | 696 | // phpbb_ext_gallery_core_image::generate_link('thumbnail', $phpbb_ext_gallery->config->get('link_thumbnail'), $lastimage_image_id, $lastimage_name, $lastimage_album_id); |
| 697 | 697 | $lastimage_uc_thumbnail = $row['album_image'] ? generate_board_url() . '/' . $row['album_image'] : $this->helper->route('phpbbgallery_core_image_file_mini', array('image_id' => $row['album_last_image_id'])); |
| 698 | 698 | // 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); |
| 699 | - $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); |
|
| 699 | + $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 | 700 | // 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 | - $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); |
|
| 701 | + $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 | 702 | } |
| 703 | 703 | else |
| 704 | 704 | { |
@@ -226,8 +226,7 @@ discard block |
||
| 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 | } |
@@ -296,16 +295,14 @@ discard block |
||
| 296 | 295 | if (!empty($row['user_id'])) |
| 297 | 296 | { |
| 298 | 297 | $album_moderators[$a_id][] = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); |
| 299 | - } |
|
| 300 | - else |
|
| 298 | + } else |
|
| 301 | 299 | { |
| 302 | 300 | $group_name = (($row['group_type'] == GROUP_SPECIAL) ? $this->language->lang('G_' . $row['group_name']) : $row['group_name']); |
| 303 | 301 | |
| 304 | 302 | if ($this->user->data['user_id'] != ANONYMOUS && !$this->auth->acl_get('u_viewprofile')) |
| 305 | 303 | { |
| 306 | 304 | $album_moderators[$a_id][] = '<span' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . '>' . $group_name . '</span>'; |
| 307 | - } |
|
| 308 | - else |
|
| 305 | + } else |
|
| 309 | 306 | { |
| 310 | 307 | $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&g=' . $row['group_id']) . '">' . $group_name . '</a>'; |
| 311 | 308 | } |
@@ -349,8 +346,7 @@ discard block |
||
| 349 | 346 | } |
| 350 | 347 | $root_data = array('album_id' => (int) \phpbbgallery\core\block::PUBLIC_ALBUM); |
| 351 | 348 | $sql_where = 'a.album_user_id = ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM; |
| 352 | - } |
|
| 353 | - else if ($root_data == 'personal') |
|
| 349 | + } else if ($root_data == 'personal') |
|
| 354 | 350 | { |
| 355 | 351 | if ($mark_read == 'albums') |
| 356 | 352 | { |
@@ -368,8 +364,7 @@ discard block |
||
| 368 | 364 | { |
| 369 | 365 | $sql_where .= ' AND u.username_clean NOT ' . $this->db->sql_like_expression(chr($i) . $this->db->any_char); |
| 370 | 366 | } |
| 371 | - } |
|
| 372 | - else if ($first_char) |
|
| 367 | + } else if ($first_char) |
|
| 373 | 368 | { |
| 374 | 369 | $sql_where .= ' AND u.username_clean ' . $this->db->sql_like_expression(substr($first_char, 0, 1) . $this->db->any_char); |
| 375 | 370 | } |
@@ -413,8 +408,7 @@ discard block |
||
| 413 | 408 | 'phpbbgallery_core_search_recent_page',), |
| 414 | 409 | 'params' => array()), 'pagination', 'page', $num_pegas, $limit, $start |
| 415 | 410 | );*/ |
| 416 | - } |
|
| 417 | - else |
|
| 411 | + } else |
|
| 418 | 412 | { |
| 419 | 413 | $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']; |
| 420 | 414 | } |
@@ -502,10 +496,12 @@ discard block |
||
| 502 | 496 | continue; |
| 503 | 497 | } |
| 504 | 498 | |
| 505 | - if (false)//@todo !$this->gallery_auth->acl_check('a_list', $album_id, $row['album_user_id'])) |
|
| 499 | + if (false) { |
|
| 500 | + //@todo !$this->gallery_auth->acl_check('a_list', $album_id, $row['album_user_id'])) |
|
| 506 | 501 | { |
| 507 | 502 | // if the user does not have permissions to list this album, skip everything until next branch |
| 508 | 503 | $right_id = $row['right_id']; |
| 504 | + } |
|
| 509 | 505 | continue; |
| 510 | 506 | } |
| 511 | 507 | |
@@ -530,8 +526,7 @@ discard block |
||
| 530 | 526 | $album_rows[$parent_id]['album_type_last_image'] = $row['album_type']; |
| 531 | 527 | $album_rows[$parent_id]['album_contest_marked'] = $row['contest_marked']; |
| 532 | 528 | $album_rows[$parent_id]['orig_album_last_image_time'] = $row['album_last_image_time']; |
| 533 | - } |
|
| 534 | - else if ($row['album_type']) |
|
| 529 | + } else if ($row['album_type']) |
|
| 535 | 530 | { |
| 536 | 531 | $subalbums[$parent_id][$album_id]['display'] = ($row['display_on_index']) ? true : false; |
| 537 | 532 | $subalbums[$parent_id][$album_id]['name'] = $row['album_name']; |
@@ -573,16 +568,14 @@ discard block |
||
| 573 | 568 | { |
| 574 | 569 | $this->misc->markread('all'); |
| 575 | 570 | $message = $this->language->lang('RETURN_INDEX', '<a href="' . $redirect . '">', '</a>'); |
| 576 | - } |
|
| 577 | - else |
|
| 571 | + } else |
|
| 578 | 572 | { |
| 579 | 573 | $this->misc->markread('albums', $album_ids); |
| 580 | 574 | $message = $this->language->lang('RETURN_ALBUM', '<a href="' . $redirect . '">', '</a>'); |
| 581 | 575 | } |
| 582 | 576 | meta_refresh(3, $redirect); |
| 583 | 577 | trigger_error($this->language->lang('ALBUMS_MARKED') . '<br /><br />' . $message); |
| 584 | - } |
|
| 585 | - else |
|
| 578 | + } else |
|
| 586 | 579 | { |
| 587 | 580 | $message = $this->language->lang('RETURN_PAGE', '<a href="' . $redirect . '">', '</a>'); |
| 588 | 581 | meta_refresh(3, $redirect); |
@@ -660,8 +653,7 @@ discard block |
||
| 660 | 653 | 'name' => $subalbum_row['name'], |
| 661 | 654 | 'unread' => $subalbum_unread, |
| 662 | 655 | ); |
| 663 | - } |
|
| 664 | - else |
|
| 656 | + } else |
|
| 665 | 657 | { |
| 666 | 658 | unset($subalbums[$album_id][$subalbum_id]); |
| 667 | 659 | } |
@@ -674,8 +666,7 @@ discard block |
||
| 674 | 666 | |
| 675 | 667 | $l_subalbums = (sizeof($subalbums[$album_id]) == 1) ? $this->language->lang('SUBALBUM') : $this->language->lang('SUBALBUMS'); |
| 676 | 668 | $folder_image = ($album_unread) ? 'forum_unread_subforum' : 'forum_read_subforum'; |
| 677 | - } |
|
| 678 | - else |
|
| 669 | + } else |
|
| 679 | 670 | { |
| 680 | 671 | $folder_alt = ($album_unread) ? 'NEW_IMAGES' : 'NO_NEW_IMAGES'; |
| 681 | 672 | $folder_image = ($album_unread) ? 'forum_unread' : 'forum_read'; |
@@ -701,8 +692,7 @@ discard block |
||
| 701 | 692 | $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); |
| 702 | 693 | // 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); |
| 703 | 694 | $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); |
| 704 | - } |
|
| 705 | - else |
|
| 695 | + } else |
|
| 706 | 696 | { |
| 707 | 697 | $lastimage_time = $lastimage_album_type = $lastimage_contest_marked = 0; |
| 708 | 698 | $lastimage_uc_fake_thumbnail = $lastimage_uc_fake_thumbnail_url = $lastimage_uc_thumbnail = $lastimage_uc_name = $lastimage_uc_icon = ''; |
@@ -142,8 +142,7 @@ discard block |
||
| 142 | 142 | try |
| 143 | 143 | { |
| 144 | 144 | $this->loader->load($album_id); |
| 145 | - } |
|
| 146 | - catch (\Exception $e) |
|
| 145 | + } catch (\Exception $e) |
|
| 147 | 146 | { |
| 148 | 147 | throw new \phpbb\exception\http_exception(404, 'ALBUM_NOT_EXIST'); |
| 149 | 148 | } |
@@ -203,8 +202,7 @@ discard block |
||
| 203 | 202 | 'phpbbgallery_core_album_upload', |
| 204 | 203 | array('album_id' => (int) $album_id) |
| 205 | 204 | )); |
| 206 | - } |
|
| 207 | - else |
|
| 205 | + } else |
|
| 208 | 206 | { |
| 209 | 207 | if ($album_data['contest_start'] + $album_data['contest_rating'] > time()) |
| 210 | 208 | { |
@@ -261,8 +259,7 @@ discard block |
||
| 261 | 259 | { |
| 262 | 260 | $image_status_check = ''; |
| 263 | 261 | $image_counter = $album_data['album_images_real']; |
| 264 | - } |
|
| 265 | - else |
|
| 262 | + } else |
|
| 266 | 263 | { |
| 267 | 264 | $image_status_check = " AND (image_status <> " . (int) \phpbbgallery\core\block::STATUS_UNAPPROVED . " OR image_user_id = $user_id)"; |
| 268 | 265 | |
@@ -279,8 +276,7 @@ discard block |
||
| 279 | 276 | if (in_array($sort_key, array('r', 'ra'))) |
| 280 | 277 | { |
| 281 | 278 | $sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'ASC' : 'DESC'); |
| 282 | - } |
|
| 283 | - else |
|
| 279 | + } else |
|
| 284 | 280 | { |
| 285 | 281 | $sql_help_sort = ', image_id ' . (($sort_dir == 'd') ? 'DESC' : 'ASC'); |
| 286 | 282 | } |
@@ -471,8 +467,7 @@ discard block |
||
| 471 | 467 | )); |
| 472 | 468 | $this->url->meta_refresh(3, $back_link); |
| 473 | 469 | return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY')); |
| 474 | - } |
|
| 475 | - else |
|
| 470 | + } else |
|
| 476 | 471 | { |
| 477 | 472 | $this->notifications_helper->add_albums($album_id); |
| 478 | 473 | $this->template->assign_vars(array( |
@@ -481,14 +476,12 @@ discard block |
||
| 481 | 476 | $this->url->meta_refresh(3, $back_link); |
| 482 | 477 | return $this->helper->render('gallery/message.html', $this->language->lang('GALLERY')); |
| 483 | 478 | } |
| 484 | - } |
|
| 485 | - else |
|
| 479 | + } else |
|
| 486 | 480 | { |
| 487 | 481 | if ($this->notifications_helper->get_watched_album($album_id) == 1) |
| 488 | 482 | { |
| 489 | 483 | $lang = $this->language->lang('UNWATCH_ALBUM'); |
| 490 | - } |
|
| 491 | - else |
|
| 484 | + } else |
|
| 492 | 485 | { |
| 493 | 486 | $lang = $this->language->lang('WATCH_ALBUM'); |
| 494 | 487 | } |
@@ -520,8 +513,7 @@ discard block |
||
| 520 | 513 | if (!$this->user->data['is_registered']) |
| 521 | 514 | { |
| 522 | 515 | login_box(); |
| 523 | - } |
|
| 524 | - else |
|
| 516 | + } else |
|
| 525 | 517 | { |
| 526 | 518 | //return $this->error('NOT_AUTHORISED', 403); |
| 527 | 519 | trigger_error($this->language->lang('NOT_AUTHORISED')); |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | $album_user_id = $image_data['album_user_id']; |
| 355 | 355 | |
| 356 | 356 | //@todo: $rating = new phpbb_gallery_image_rating($image_data['image_id'], $image_data, $image_data); |
| 357 | - $image_data['rating'] = '0';//@todo: $rating->get_image_rating(false, false); |
|
| 357 | + $image_data['rating'] = '0'; //@todo: $rating->get_image_rating(false, false); |
|
| 358 | 358 | //@todo: unset($rating); |
| 359 | 359 | |
| 360 | 360 | $s_user_allowed = (($image_data['image_user_id'] == $this->user->data['user_id']) && ($album_status != (int) \phpbbgallery\core\block::ALBUM_LOCKED)); |
@@ -412,14 +412,14 @@ discard block |
||
| 412 | 412 | |
| 413 | 413 | 'U_USER_IP' => $show_ip && $this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id) ? $image_data['image_user_ip'] : false, |
| 414 | 414 | 'S_IMAGE_REPORTED' => $image_data['image_reported'], |
| 415 | - 'U_IMAGE_REPORTED' => '',//($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_reported']) : '', |
|
| 415 | + 'U_IMAGE_REPORTED' => '', //($image_data['image_reported']) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=report_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_reported']) : '', |
|
| 416 | 416 | 'S_STATUS_APPROVED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_APPROVED) ? true : false, |
| 417 | 417 | 'S_STATUS_UNAPPROVED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_UNAPPROVED) ? true : false, |
| 418 | 418 | 'S_STATUS_UNAPPROVED_ACTION' => ($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id) && $image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->helper->route('phpbbgallery_core_moderate_image_approve', array('image_id' => $image_data['image_id'])) : '', |
| 419 | 419 | 'S_STATUS_LOCKED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_LOCKED) ? true : false, |
| 420 | 420 | |
| 421 | 421 | 'U_REPORT' => ($this->auth->acl_check('m_report', $image_data['image_album_id'], $album_user_id) && $image_data['image_reported']) ? '123'/*$this->url->append_sid('mcp', "mode=report_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_reported'])*/ : '', |
| 422 | - 'U_STATUS' => '',//($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_id']) : '', |
|
| 422 | + 'U_STATUS' => '', //($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id)) ? $phpbb_ext_gallery->url->append_sid('mcp', "mode=queue_details&album_id={$image_data['image_album_id']}&option_id=" . $image_data['image_id']) : '', |
|
| 423 | 423 | 'L_STATUS' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->language->lang('APPROVE_IMAGE') : (($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_APPROVED) ? $this->language->lang('CHANGE_IMAGE_STATUS') : $this->language->lang('UNLOCK_IMAGE')), |
| 424 | 424 | |
| 425 | 425 | 'S_CONTEST_RANK' => $image_data['image_contest_rank'], |
@@ -221,8 +221,7 @@ discard block |
||
| 221 | 221 | { |
| 222 | 222 | $padding .= ' '; |
| 223 | 223 | $padding_store[$row['parent_id']] = $padding; |
| 224 | - } |
|
| 225 | - else if ($row['left_id'] > $right + 1) |
|
| 224 | + } else if ($row['left_id'] > $right + 1) |
|
| 226 | 225 | { |
| 227 | 226 | $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : ''; |
| 228 | 227 | } |
@@ -248,15 +247,13 @@ discard block |
||
| 248 | 247 | if (($select_id == $this->gallery_auth->get_setting_permissions()) && !$row['album_user_id']) |
| 249 | 248 | { |
| 250 | 249 | $list = true; |
| 251 | - } |
|
| 252 | - else if (!$row['album_user_id']) |
|
| 250 | + } else if (!$row['album_user_id']) |
|
| 253 | 251 | { |
| 254 | 252 | if ($this->gallery_auth->acl_check('a_list', $row['album_id'], $row['album_user_id']) || defined('IN_ADMIN')) |
| 255 | 253 | { |
| 256 | 254 | $list = true; |
| 257 | 255 | } |
| 258 | - } |
|
| 259 | - else if (!$ignore_personals) |
|
| 256 | + } else if (!$ignore_personals) |
|
| 260 | 257 | { |
| 261 | 258 | if ($row['album_user_id'] == $this->user->data['user_id']) |
| 262 | 259 | { |
@@ -267,16 +264,14 @@ discard block |
||
| 267 | 264 | if ($requested_permission) |
| 268 | 265 | { |
| 269 | 266 | $requested_own = !$this->gallery_auth->acl_check($requested_permission, $this->gallery_auth->get_own_album()); |
| 270 | - } |
|
| 271 | - else |
|
| 267 | + } else |
|
| 272 | 268 | { |
| 273 | 269 | $requested_own = false; // We need the negated version of true here |
| 274 | 270 | } |
| 275 | 271 | } |
| 276 | 272 | $list = (!$list) ? $access_own : $list; |
| 277 | 273 | $disabled = (!$disabled) ? $requested_own : $disabled; |
| 278 | - } |
|
| 279 | - else if ($row['album_user_id']) |
|
| 274 | + } else if ($row['album_user_id']) |
|
| 280 | 275 | { |
| 281 | 276 | if (!$c_access_personal) |
| 282 | 277 | { |
@@ -285,8 +280,7 @@ discard block |
||
| 285 | 280 | if ($requested_permission) |
| 286 | 281 | { |
| 287 | 282 | $requested_personal = !$this->gallery_auth->acl_check($requested_permission, $this->gallery_auth->get_personal_album()); |
| 288 | - } |
|
| 289 | - else |
|
| 283 | + } else |
|
| 290 | 284 | { |
| 291 | 285 | $requested_personal = false; // We need the negated version of true here |
| 292 | 286 | } |
@@ -298,8 +292,7 @@ discard block |
||
| 298 | 292 | if (($album_user_id != (int) \phpbbgallery\core\block::PUBLIC_ALBUM) && ($album_user_id != $row['album_user_id'])) |
| 299 | 293 | { |
| 300 | 294 | $list = false; |
| 301 | - } |
|
| 302 | - else if (($album_user_id != (int) \phpbbgallery\core\block::PUBLIC_ALBUM) && ($row['parent_id'] == 0)) |
|
| 295 | + } else if (($album_user_id != (int) \phpbbgallery\core\block::PUBLIC_ALBUM) && ($row['parent_id'] == 0)) |
|
| 303 | 296 | { |
| 304 | 297 | $disabled = true; |
| 305 | 298 | } |
@@ -317,8 +310,7 @@ discard block |
||
| 317 | 310 | $gallery_albumbox = "<select name='$select_name' id='$select_name'>"; |
| 318 | 311 | $gallery_albumbox .= $album_list; |
| 319 | 312 | $gallery_albumbox .= '</select>'; |
| 320 | - } |
|
| 321 | - else |
|
| 313 | + } else |
|
| 322 | 314 | { |
| 323 | 315 | $gallery_albumbox = $album_list; |
| 324 | 316 | } |
@@ -387,8 +379,7 @@ discard block |
||
| 387 | 379 | 'album_last_user_colour' => $row['image_user_colour'], |
| 388 | 380 | 'album_last_user_id' => $row['image_user_id'], |
| 389 | 381 | ); |
| 390 | - } |
|
| 391 | - else |
|
| 382 | + } else |
|
| 392 | 383 | { |
| 393 | 384 | // No approved image, so we clear the columns |
| 394 | 385 | $sql_ary = array( |