@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | \phpbbgallery\core\album\album $album, \phpbbgallery\core\config $gallery_config, \phpbb\controller\helper $helper, |
103 | 103 | \phpbbgallery\core\url $url, \phpbbgallery\core\log $gallery_log, \phpbbgallery\core\notification\helper $notification_helper, |
104 | 104 | \phpbbgallery\core\report $report, \phpbbgallery\core\cache $gallery_cache, \phpbbgallery\core\user $gallery_user, |
105 | - \phpbbgallery\core\contest $contest,\phpbbgallery\core\file\file $file, |
|
105 | + \phpbbgallery\core\contest $contest, \phpbbgallery\core\file\file $file, |
|
106 | 106 | $table_images) |
107 | 107 | { |
108 | 108 | $this->db = $db; |
@@ -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) ? '=' : '<>') . ' ' . \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) ? '=' : '<>') . ' ' . \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 = ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . ' |
520 | 520 | WHERE image_status <> ' . \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 <> ' . \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); |
@@ -704,14 +704,14 @@ discard block |
||
704 | 704 | '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, |
705 | 705 | |
706 | 706 | 'S_IMAGE_REPORTED' => $image_data['image_reported'], |
707 | - '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']) : '', |
|
707 | + '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']) : '', |
|
708 | 708 | 'S_STATUS_APPROVED' => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED), |
709 | 709 | 'S_STATUS_UNAPPROVED' => ($this->gallery_auth->acl_check('m_status', $image_data['image_album_id'], $image_data['album_user_id']) && $image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? true : false, |
710 | 710 | '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'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->helper->route('phpbbgallery_core_moderate_image_approve', array('image_id' => (int) $image_data['image_id'])) : '', |
711 | 711 | 'S_STATUS_LOCKED' => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_LOCKED), |
712 | 712 | |
713 | 713 | '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'])*/ : '', |
714 | - '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']) : '', |
|
714 | + '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']) : '', |
|
715 | 715 | 'L_STATUS' => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->language->lang('APPROVE_IMAGE') : (($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED) ? $this->language->lang('CHANGE_IMAGE_STATUS') : $this->language->lang('UNLOCK_IMAGE')), |
716 | 716 | )); |
717 | 717 | } |
@@ -23,13 +23,13 @@ discard block |
||
23 | 23 | * |
24 | 24 | * Constants defining some album properties |
25 | 25 | */ |
26 | - const PUBLIC_ALBUM = 0; |
|
26 | + const PUBLIC_ALBUM = 0; |
|
27 | 27 | |
28 | - const TYPE_CAT = 0; |
|
29 | - const TYPE_UPLOAD = 1; |
|
28 | + const TYPE_CAT = 0; |
|
29 | + const TYPE_UPLOAD = 1; |
|
30 | 30 | const TYPE_CONTEST = 2; |
31 | 31 | |
32 | - const ALBUM_OPEN = 0; |
|
32 | + const ALBUM_OPEN = 0; |
|
33 | 33 | const ALBUM_LOCKED = 1; |
34 | 34 | |
35 | 35 | /** |
@@ -58,22 +58,22 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * Only visible for moderators. |
60 | 60 | */ |
61 | - const STATUS_UNAPPROVED = 0; |
|
61 | + const STATUS_UNAPPROVED = 0; |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Visible for everyone with the i_view-permissions |
65 | 65 | */ |
66 | - const STATUS_APPROVED = 1; |
|
66 | + const STATUS_APPROVED = 1; |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * Visible for everyone with the i_view-permissions, but only moderators can comment. |
70 | 70 | */ |
71 | - const STATUS_LOCKED = 2; |
|
71 | + const STATUS_LOCKED = 2; |
|
72 | 72 | |
73 | 73 | /** |
74 | 74 | * Orphan files are only visible for their author, because they're not yet ready uploaded. |
75 | 75 | */ |
76 | - const STATUS_ORPHAN = 3; |
|
76 | + const STATUS_ORPHAN = 3; |
|
77 | 77 | |
78 | 78 | /** |
79 | 79 | * Constants regarding the image contest relation |
@@ -316,7 +316,7 @@ |
||
316 | 316 | |
317 | 317 | public function generate_image_src() |
318 | 318 | { |
319 | - $this->image_src = $this->path . $this->data['image_filename']; |
|
319 | + $this->image_src = $this->path . $this->data['image_filename']; |
|
320 | 320 | |
321 | 321 | if ($this->data['image_filemissing'] || !file_exists($this->path_source . $this->data['image_filename'])) |
322 | 322 | { |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $approve_ary = $this->request->variable('approval', array('' => array(0))); |
194 | 194 | $action_ary = $this->request->variable('action', array('' => 0)); |
195 | 195 | $back_link = $this->request->variable('back_link', $album_id > 0 ? $this->helper->route('phpbbgallery_core_moderate_queue_approve_album', array('album_id' => $album_id)) : $this->helper->route('phpbbgallery_core_moderate_queue_approve')); |
196 | - list($action, ) = each($action_ary); |
|
196 | + list($action,) = each($action_ary); |
|
197 | 197 | |
198 | 198 | $this->language->add_lang(array('gallery_mcp', 'gallery'), 'phpbbgallery/core'); |
199 | 199 | $this->language->add_lang('mcp'); |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | else |
258 | 258 | { |
259 | - $s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />'; |
|
259 | + $s_hidden_fields = '<input type="hidden" name="action[' . $action . ']" value="' . $action . '" />'; |
|
260 | 260 | $s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />'; |
261 | 261 | foreach ($approve_ary as $id => $var) |
262 | 262 | { |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | $report_ary = $this->request->variable('report', array(0)); |
339 | 339 | $action_ary = $this->request->variable('action', array('' => 0)); |
340 | 340 | $back_link = $this->request->variable('back_link', $album_id > 0 ? $this->helper->route('phpbbgallery_core_moderate_reports_album', array('album_id' => $album_id)) : $this->helper->route('phpbbgallery_core_moderate_reports')); |
341 | - list($action, ) = each($action_ary); |
|
341 | + list($action,) = each($action_ary); |
|
342 | 342 | |
343 | 343 | $this->language->add_lang(array('gallery_mcp', 'gallery'), 'phpbbgallery/core'); |
344 | 344 | $this->language->add_lang('mcp'); |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | } |
355 | 355 | else |
356 | 356 | { |
357 | - $s_hidden_fields = '<input type="hidden" name="action['.$action.']" value="' . $action . '" />'; |
|
357 | + $s_hidden_fields = '<input type="hidden" name="action[' . $action . ']" value="' . $action . '" />'; |
|
358 | 358 | $s_hidden_fields .= '<input type="hidden" name="back_link" value="' . $back_link . '" />'; |
359 | 359 | foreach ($report_ary as $var) |
360 | 360 | { |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | case 'reports_close': |
577 | 577 | if (confirm_box(true)) |
578 | 578 | { |
579 | - $back_link = $this->helper->route('phpbbgallery_core_moderate_image', array('image_id' => $image_id)); |
|
579 | + $back_link = $this->helper->route('phpbbgallery_core_moderate_image', array('image_id' => $image_id)); |
|
580 | 580 | $this->report->close_reports_by_image($image_id); |
581 | 581 | $message = $this->language->lang('WAITING_REPORTED_DONE', 1); |
582 | 582 | $this->url->meta_refresh(3, $back_link); |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | 'REPORT_TIME' => $this->user->format_date($var['report_time']), |
673 | 673 | 'REPORT_NOTE' => $var['report_note'], |
674 | 674 | 'STATUS' => $var['report_status'], |
675 | - 'MANAGER' => $var['report_manager'] != 0 ? $this->user_loader->get_username($var['report_manager'], 'full') : false, |
|
675 | + 'MANAGER' => $var['report_manager'] != 0 ? $this->user_loader->get_username($var['report_manager'], 'full') : false, |
|
676 | 676 | )); |
677 | 677 | } |
678 | 678 | return $this->helper->render('gallery/moderate_image_overview.html', $this->language->lang('GALLERY')); |
@@ -797,7 +797,7 @@ discard block |
||
797 | 797 | $image_data = $this->image->get_image_data($image_id); |
798 | 798 | $album_id = $image_data['image_album_id']; |
799 | 799 | //$user_id = $image_data['image_user_id']; |
800 | - $album_data = $this->album->get_info($album_id); |
|
800 | + $album_data = $this->album->get_info($album_id); |
|
801 | 801 | $album_backlink = $this->helper->route('phpbbgallery_core_album', array('album_id' => $album_id)); |
802 | 802 | $image_backlink = $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id)); |
803 | 803 | $album_loginlink = append_sid($this->root_path . 'ucp.' . $this->php_ext . '?mode=login'); |
@@ -845,7 +845,7 @@ discard block |
||
845 | 845 | $image_data = $this->image->get_image_data($image_id); |
846 | 846 | $album_id = $image_data['image_album_id']; |
847 | 847 | //$user_id = $image_data['image_user_id']; |
848 | - $album_data = $this->album->get_info($album_id); |
|
848 | + $album_data = $this->album->get_info($album_id); |
|
849 | 849 | $album_backlink = $this->helper->route('phpbbgallery_core_album', array('album_id' => $album_id)); |
850 | 850 | $image_backlink = $this->helper->route('phpbbgallery_core_image', array('image_id' => $image_id)); |
851 | 851 | $album_loginlink = append_sid($this->root_path . 'ucp.' . $this->php_ext . '?mode=login'); |
@@ -861,7 +861,7 @@ discard block |
||
861 | 861 | $image_id_ary = array($image_id); |
862 | 862 | $this->image->lock_images($image_id_ary, $album_data['album_id']); |
863 | 863 | // To DO - add notification |
864 | - $message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE',1)); |
|
864 | + $message = sprintf($this->language->lang('WAITING_LOCKED_IMAGE', 1)); |
|
865 | 865 | meta_refresh($meta_refresh_time, $image_backlink); |
866 | 866 | trigger_error($message); |
867 | 867 | } |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | * @param string $images_table Gallery image table |
73 | 73 | */ |
74 | 74 | public function __construct(\phpbb\config\config $config, \phpbb\controller\helper $helper, |
75 | - \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, |
|
75 | + \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, |
|
76 | 76 | \phpbb\template\template $template, \phpbb\user $user, \phpbb\language\language $language, |
77 | 77 | \phpbbgallery\core\album\display $display, \phpbbgallery\core\album\loader $loader, |
78 | 78 | \phpbbgallery\core\auth\auth $auth, \phpbbgallery\core\auth\level $auth_level, |
79 | - \phpbbgallery\core\config $gallery_config,\phpbbgallery\core\notification\helper $notifications_helper, |
|
79 | + \phpbbgallery\core\config $gallery_config, \phpbbgallery\core\notification\helper $notifications_helper, |
|
80 | 80 | \phpbbgallery\core\url $url, \phpbbgallery\core\image\image $image, \phpbb\request\request $request, |
81 | 81 | \phpbbgallery\core\contest $contest, |
82 | 82 | $images_table) |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | */ |
222 | 222 | protected function display_images($album_id, $album_data, $start, $limit) |
223 | 223 | { |
224 | - $sort_days = $this->request->variable('st', 0); |
|
224 | + $sort_days = $this->request->variable('st', 0); |
|
225 | 225 | $sort_key = $this->request->variable('sk', ($album_data['album_sort_key']) ? $album_data['album_sort_key'] : $this->config['phpbb_gallery_default_sort_key']); |
226 | 226 | $sort_dir = $this->request->variable('sd', ($album_data['album_sort_dir']) ? $album_data['album_sort_dir'] : $this->config['phpbb_gallery_default_sort_dir']); |
227 | 227 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | $album_user_id = $image_data['album_user_id']; |
345 | 345 | |
346 | 346 | //@todo: $rating = new phpbb_gallery_image_rating($image_data['image_id'], $image_data, $image_data); |
347 | - $image_data['rating'] = '0';//@todo: $rating->get_image_rating(false, false); |
|
347 | + $image_data['rating'] = '0'; //@todo: $rating->get_image_rating(false, false); |
|
348 | 348 | //@todo: unset($rating); |
349 | 349 | |
350 | 350 | $s_user_allowed = (($image_data['image_user_id'] == $this->user->data['user_id']) && ($album_status != \phpbbgallery\core\block::ALBUM_LOCKED)); |
@@ -402,14 +402,14 @@ discard block |
||
402 | 402 | |
403 | 403 | '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, |
404 | 404 | 'S_IMAGE_REPORTED' => $image_data['image_reported'], |
405 | - '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']) : '', |
|
405 | + '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']) : '', |
|
406 | 406 | 'S_STATUS_APPROVED' => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED), |
407 | 407 | 'S_STATUS_UNAPPROVED' => ($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id) && $image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? true : false, |
408 | 408 | 'S_STATUS_UNAPPROVED_ACTION' => ($this->auth->acl_check('m_status', $image_data['image_album_id'], $album_user_id) && $image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->helper->route('phpbbgallery_core_moderate_image_approve', array('image_id' => $image_data['image_id'])) : '', |
409 | 409 | 'S_STATUS_LOCKED' => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_LOCKED), |
410 | 410 | |
411 | 411 | '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'])*/ : '', |
412 | - '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']) : '', |
|
412 | + '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']) : '', |
|
413 | 413 | 'L_STATUS' => ($image_data['image_status'] == \phpbbgallery\core\block::STATUS_UNAPPROVED) ? $this->language->lang('APPROVE_IMAGE') : (($image_data['image_status'] == \phpbbgallery\core\block::STATUS_APPROVED) ? $this->language->lang('CHANGE_IMAGE_STATUS') : $this->language->lang('UNLOCK_IMAGE')), |
414 | 414 | |
415 | 415 | 'S_CONTEST_RANK' => $image_data['image_contest_rank'], |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | 'U_IMAGENAME' => ($last_image['image_id'] > 0) ? $last_image['image_name'] : false, |
160 | 160 | 'U_IMAGE_ACTION' => $action_image, |
161 | 161 | 'U_IMAGENAME_ACTION' => $this->helper->route('phpbbgallery_core_image', array('image_id' => $last_image['image_id'])), |
162 | - 'U_TIME' => ($last_image['image_id'] > 0) ? $this->user->format_date($last_image['image_time']) : false, |
|
162 | + 'U_TIME' => ($last_image['image_id'] > 0) ? $this->user->format_date($last_image['image_time']) : false, |
|
163 | 163 | 'U_UPLOADER' => ($last_image['image_id'] > 0) ? get_username_string('full', $last_image['image_user_id'], $last_image['image_username'], $last_image['image_user_colour']) : false, |
164 | 164 | )); |
165 | 165 | $this->gallery_user->set_user_id($this->user->data['user_id']); |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | 'TOTAL_IMAGES' => ($this->gallery_config->get('disp_statistic')) ? $this->language->lang('TOTAL_IMAGES_SPRINTF', $this->gallery_config->get('num_images')) : '', |
319 | 319 | 'TOTAL_COMMENTS' => ($this->gallery_config->get('allow_comments')) ? $this->language->lang('TOTAL_COMMENTS_SPRINTF', $this->gallery_config->get('num_comments')) : '', |
320 | 320 | 'TOTAL_PGALLERIES' => ($this->gallery_auth->acl_check('a_list', \phpbbgallery\core\auth\auth::PERSONAL_ALBUM)) ? $this->language->lang('TOTAL_PEGAS_SPRINTF', $this->gallery_config->get('num_pegas')) : '', |
321 | - 'NEWEST_PGALLERIES' => ($this->gallery_config->get('num_pegas')) ? sprintf($this->language->lang('NEWEST_PGALLERY'), '<a href="' . $this->helper->route('phpbbgallery_core_album', array('album_id' => $this->gallery_config->get('newest_pega_album_id'))) . '" '. ($this->gallery_config->get('newest_pega_user_colour') ? 'class="username-coloured" style="color: #' . $this->gallery_config->get('newest_pega_user_colour') . ';"' : 'class="username"') . '>' . $this->gallery_config->get('newest_pega_username') . '</a>') : '', |
|
321 | + 'NEWEST_PGALLERIES' => ($this->gallery_config->get('num_pegas')) ? sprintf($this->language->lang('NEWEST_PGALLERY'), '<a href="' . $this->helper->route('phpbbgallery_core_album', array('album_id' => $this->gallery_config->get('newest_pega_album_id'))) . '" ' . ($this->gallery_config->get('newest_pega_user_colour') ? 'class="username-coloured" style="color: #' . $this->gallery_config->get('newest_pega_user_colour') . ';"' : 'class="username"') . '>' . $this->gallery_config->get('newest_pega_username') . '</a>') : '', |
|
322 | 322 | )); |
323 | 323 | |
324 | 324 | $this->template->assign_vars(array( |
@@ -416,9 +416,9 @@ discard block |
||
416 | 416 | |
417 | 417 | while ($row = $this->db->sql_fetchrow($result)) |
418 | 418 | { |
419 | - $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); |
|
420 | - $birthday_year = (int) substr($row['user_birthday'], -4); |
|
421 | - $birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : ''; |
|
419 | + $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); |
|
420 | + $birthday_year = (int) substr($row['user_birthday'], -4); |
|
421 | + $birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : ''; |
|
422 | 422 | |
423 | 423 | $this->template->assign_block_vars('birthdays', array( |
424 | 424 | 'USERNAME' => $birthday_username, |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | include_once($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
198 | 198 | } |
199 | 199 | |
200 | - $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
201 | - $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
200 | + $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
201 | + $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
202 | 202 | $img_status = ($bbcode_status) ? true : false; |
203 | 203 | $url_status = ($this->config['allow_post_links']) ? true : false; |
204 | 204 | $flash_status = false; |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } |
306 | 306 | |
307 | 307 | $message_parser = new \parse_message(); |
308 | - $message_parser->message = utf8_normalize_nfc($comment_plain); |
|
308 | + $message_parser->message = utf8_normalize_nfc($comment_plain); |
|
309 | 309 | if ($message_parser->message) |
310 | 310 | { |
311 | 311 | $message_parser->parse(true, true, true, true, false, true, true, true); |
@@ -464,8 +464,8 @@ discard block |
||
464 | 464 | include_once($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext); |
465 | 465 | } |
466 | 466 | |
467 | - $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
468 | - $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
467 | + $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
468 | + $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
469 | 469 | $img_status = ($bbcode_status) ? true : false; |
470 | 470 | $url_status = ($this->config['allow_post_links']) ? true : false; |
471 | 471 | $flash_status = false; |
@@ -678,8 +678,8 @@ discard block |
||
678 | 678 | include_once($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext); |
679 | 679 | } |
680 | 680 | |
681 | - $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
682 | - $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
681 | + $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
682 | + $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
683 | 683 | $img_status = ($bbcode_status) ? true : false; |
684 | 684 | $url_status = ($this->config['allow_post_links']) ? true : false; |
685 | 685 | $flash_status = false; |
@@ -759,7 +759,7 @@ discard block |
||
759 | 759 | 'IMAGE_NAME' => $image_data['image_name'], |
760 | 760 | |
761 | 761 | 'S_SIGNATURE_CHECKED' => (isset($sig_checked) && $sig_checked) ? ' checked="checked"' : '', |
762 | - 'S_ALBUM_ACTION' => append_sid($this->url->path('full') . 'comment/' . (int) $image_id . '/edit/'. (int) $comment_id), |
|
762 | + 'S_ALBUM_ACTION' => append_sid($this->url->path('full') . 'comment/' . (int) $image_id . '/edit/' . (int) $comment_id), |
|
763 | 763 | )); |
764 | 764 | |
765 | 765 | if ($submit && !$error) |
@@ -808,8 +808,8 @@ discard block |
||
808 | 808 | include_once($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext); |
809 | 809 | } |
810 | 810 | |
811 | - $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
812 | - $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
811 | + $bbcode_status = ($this->config['allow_bbcode']) ? true : false; |
|
812 | + $smilies_status = ($this->config['allow_smilies']) ? true : false; |
|
813 | 813 | $img_status = ($bbcode_status) ? true : false; |
814 | 814 | $url_status = ($this->config['allow_post_links']) ? true : false; |
815 | 815 | $flash_status = false; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | 'IMAGE_ALBUM_ID' => $VAR['image_album_id'], |
143 | 143 | )); |
144 | 144 | unset($album_tmp); |
145 | - $waiting_images ++; |
|
145 | + $waiting_images++; |
|
146 | 146 | } |
147 | 147 | $this->template->assign_vars(array( |
148 | 148 | 'TOTAL_IMAGES_WAITING' => $this->lang->lang('WAITING_UNAPPROVED_IMAGE', (int) $count), |
@@ -212,21 +212,21 @@ discard block |
||
212 | 212 | { |
213 | 213 | $status[] = 0; |
214 | 214 | $status[] = 2; |
215 | - $actions['approve'] = 'QUEUES_A_APPROVE'; |
|
216 | - $actions['unapprove'] = 'QUEUES_A_UNAPPROVE'; |
|
217 | - $actions['lock'] = 'QUEUES_A_LOCK'; |
|
215 | + $actions['approve'] = 'QUEUES_A_APPROVE'; |
|
216 | + $actions['unapprove'] = 'QUEUES_A_UNAPPROVE'; |
|
217 | + $actions['lock'] = 'QUEUES_A_LOCK'; |
|
218 | 218 | } |
219 | 219 | if ($this->gallery_auth->acl_check('m_delete', $album['album_id'], $album['album_user_id'])) |
220 | 220 | { |
221 | - $actions['delete'] = 'QUEUES_A_DELETE'; |
|
221 | + $actions['delete'] = 'QUEUES_A_DELETE'; |
|
222 | 222 | } |
223 | 223 | if ($this->gallery_auth->acl_check('m_move', $album['album_id'], $album['album_user_id'])) |
224 | 224 | { |
225 | - $actions['move'] = 'QUEUES_A_MOVE'; |
|
225 | + $actions['move'] = 'QUEUES_A_MOVE'; |
|
226 | 226 | } |
227 | 227 | if ($this->gallery_auth->acl_check('m_report', $album['album_id'], $album['album_user_id'])) |
228 | 228 | { |
229 | - $actions['report'] = 'REPORT_A_CLOSE'; |
|
229 | + $actions['report'] = 'REPORT_A_CLOSE'; |
|
230 | 230 | } |
231 | 231 | $sql = 'SELECT COUNT(DISTINCT image_id) AS count FROM ' . $this->images_table . ' WHERE ' . $this->db->sql_in_set('image_status', $status) . ' AND image_album_id = ' . (int) $album_id; |
232 | 232 | $result = $this->db->sql_query($sql); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | throw new \phpbb\exception\http_exception(404, 'ALBUM_NOT_EXIST'); |
127 | 127 | } |
128 | 128 | |
129 | - if ($extended_info && !isset($row['contest_id'])) |
|
129 | + if ($extended_info && !isset($row['contest_id'])) |
|
130 | 130 | { |
131 | 131 | $row['contest_id'] = 0; |
132 | 132 | $row['contest_rates_start'] = 0; |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | |
340 | 340 | // Get the album_user_id, so we can keep the user_colour |
341 | 341 | $sql = 'SELECT album_user_id |
342 | - FROM ' . $this->albums_table .' |
|
342 | + FROM ' . $this->albums_table . ' |
|
343 | 343 | WHERE album_id = ' . (int) $album_id; |
344 | 344 | $result = $this->db->sql_query($sql); |
345 | 345 | $album_user_id = $this->db->sql_fetchfield('album_user_id'); |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | |
348 | 348 | // Number of not unapproved images |
349 | 349 | $sql = 'SELECT COUNT(image_id) images |
350 | - FROM ' . $this->images_table .' |
|
350 | + FROM ' . $this->images_table . ' |
|
351 | 351 | WHERE image_status <> ' . (int) $this->block->get_image_status_unapproved() . ' |
352 | 352 | AND image_status <> ' . (int) $this->block->get_image_status_orphan() . ' |
353 | 353 | AND image_album_id = ' . (int) $album_id; |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | |
358 | 358 | // Number of total images |
359 | 359 | $sql = 'SELECT COUNT(image_id) images_real |
360 | - FROM ' . $this->images_table .' |
|
360 | + FROM ' . $this->images_table . ' |
|
361 | 361 | WHERE image_status <> ' . (int) $this->block->get_image_status_orphan() . ' |
362 | 362 | AND image_album_id = ' . (int) $album_id; |
363 | 363 | $result = $this->db->sql_query($sql); |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | |
367 | 367 | // Data of the last not unapproved image |
368 | 368 | $sql = 'SELECT image_id, image_time, image_name, image_username, image_user_colour, image_user_id |
369 | - FROM ' . $this->images_table .' |
|
369 | + FROM ' . $this->images_table . ' |
|
370 | 370 | WHERE image_status <> ' . (int) $this->block->get_image_status_unapproved() . ' |
371 | 371 | AND image_status <> ' . (int) $this->block->get_image_status_orphan() . ' |
372 | 372 | AND image_album_id = ' . (int) $album_id . ' |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | } |
406 | 406 | $this->db->sql_freeresult($result); |
407 | 407 | |
408 | - $sql = 'UPDATE ' . $this->albums_table .' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' |
|
408 | + $sql = 'UPDATE ' . $this->albums_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' |
|
409 | 409 | WHERE album_id = ' . (int) $album_id; |
410 | 410 | $this->db->sql_query($sql); |
411 | 411 | |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | 'album_last_username' => '', |
436 | 436 | 'album_last_user_colour' => $user_colour, |
437 | 437 | ); |
438 | - $this->db->sql_query('INSERT INTO ' . $this->albums_table. ' ' . $this->db->sql_build_array('INSERT', $album_data)); |
|
438 | + $this->db->sql_query('INSERT INTO ' . $this->albums_table . ' ' . $this->db->sql_build_array('INSERT', $album_data)); |
|
439 | 439 | $personal_album_id = $this->db->sql_nextid(); |
440 | 440 | |
441 | 441 | $gallery_user->update_data(array( |