@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | $this->template->assign_block_vars('commentrow', array( |
315 | 315 | 'COMMENT_ID' => (int) $var['comment_id'], |
316 | 316 | 'U_DELETE' => ($this->gallery_auth->acl_check('m_comments', $album_tmp['album_id'], $album_tmp['album_user_id']) || ($this->gallery_auth->acl_check('c_delete', $album_tmp['album_id'], $album_tmp['album_user_id']) && ($var['comment_user_id'] == $this->user->data['user_id']) && $this->user->data['is_registered'])) ? $this->helper->route('phpbbgallery_core_comment_delete', array('image_id' => $var['comment_image_id'], 'comment_id' => $var['comment_id'])) : false, |
317 | - 'U_EDIT' => $this->gallery_auth->acl_check('c_edit', $album_tmp['album_id'], $album_tmp['album_user_id'])? $this->helper->route('phpbbgallery_core_comment_edit', array('image_id' => $var['comment_image_id'], 'comment_id' => $var['comment_id'])) : false, |
|
317 | + 'U_EDIT' => $this->gallery_auth->acl_check('c_edit', $album_tmp['album_id'], $album_tmp['album_user_id']) ? $this->helper->route('phpbbgallery_core_comment_edit', array('image_id' => $var['comment_image_id'], 'comment_id' => $var['comment_id'])) : false, |
|
318 | 318 | 'U_QUOTE' => ($this->gallery_auth->acl_check('c_post', $album_tmp['album_id'], $album_tmp['album_user_id'])) ? $this->helper->route('phpbbgallery_core_comment_add', array('image_id' => $var['comment_image_id'], 'comment_id' => $var['comment_id'])) : false, |
319 | 319 | 'U_COMMENT' => $this->helper->route('phpbbgallery_core_image', array('image_id' => $var['comment_image_id'])) . '#comment_' . $var['comment_id'], |
320 | 320 | 'POST_AUTHOR_FULL' => (string) $this->user_loader->get_username($var['comment_user_id'], 'full'), |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | if ($user > 0) |
448 | 448 | { |
449 | 449 | $this->template->assign_block_vars('imageblock', array( |
450 | - 'BLOCK_NAME' => $block_name ? $block_name : '' , |
|
450 | + 'BLOCK_NAME' => $block_name ? $block_name : '', |
|
451 | 451 | 'U_BLOCK' => $u_block ? $u_block : $this->helper->route('phpbbgallery_core_search_egosearch'), |
452 | 452 | )); |
453 | 453 | } |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | $this->db->sql_freeresult($result); |
548 | 548 | $count = $row['count']; |
549 | 549 | $sql_array['SELECT'] = '* , a.album_name, a.album_status, a.album_user_id, a.album_id'; |
550 | - $sql_array['LEFT_JOIN'] = array( |
|
550 | + $sql_array['LEFT_JOIN'] = array( |
|
551 | 551 | array( |
552 | 552 | 'FROM' => array($this->albums_table => 'a'), |
553 | 553 | 'ON' => 'a.album_id = i.image_album_id', |
@@ -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', |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | protected $reports_table; |
65 | 65 | |
66 | 66 | public function __construct(\phpbbgallery\core\log $gallery_log, \phpbbgallery\core\auth\auth $gallery_auth, \phpbb\user $user, |
67 | - \phpbb\language\language $language, \phpbb\db\driver\driver_interface $db, \phpbb\user_loader $user_loader, |
|
67 | + \phpbb\language\language $language, \phpbb\db\driver\driver_interface $db, \phpbb\user_loader $user_loader, |
|
68 | 68 | \phpbbgallery\core\album\album $album, \phpbb\template\template $template, \phpbb\controller\helper $helper, |
69 | 69 | \phpbbgallery\core\config $gallery_config, \phpbb\pagination $pagination, \phpbbgallery\core\notification\helper $notification_helper, |
70 | 70 | $images_table, $reports_table) |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | 'REPORT_TIME' => $this->user->format_date($VAR['report_time']), |
364 | 364 | )); |
365 | 365 | unset($album_tmp); |
366 | - $reported_images_count ++; |
|
366 | + $reported_images_count++; |
|
367 | 367 | } |
368 | 368 | $this->template->assign_vars(array( |
369 | 369 | 'TOTAL_IMAGES_REPORTED' => $status == 1 ? $this->language->lang('WAITING_REPORTED_IMAGE', (int) $count) : $this->language->lang('WAITING_REPORTED_DONE', (int) $count), |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | 'U_IMAGENAME' => ($last_image['image_id'] > 0) ? $last_image['image_name'] : false, |
168 | 168 | 'U_IMAGE_ACTION' => $action_image, |
169 | 169 | 'U_IMAGENAME_ACTION' => $this->helper->route('phpbbgallery_core_image', array('image_id' => $last_image['image_id'])), |
170 | - 'U_TIME' => ($last_image['image_id'] > 0) ? $this->user->format_date($last_image['image_time']) : false, |
|
170 | + 'U_TIME' => ($last_image['image_id'] > 0) ? $this->user->format_date($last_image['image_time']) : false, |
|
171 | 171 | '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, |
172 | 172 | 'ALPHABET_NAVIGATION' => implode(' ', $alpha_links), |
173 | 173 | )); |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | 'TOTAL_IMAGES' => ($this->gallery_config->get('disp_statistic')) ? $this->language->lang('TOTAL_IMAGES_SPRINTF', $this->gallery_config->get('num_images')) : '', |
328 | 328 | 'TOTAL_COMMENTS' => ($this->gallery_config->get('allow_comments')) ? $this->language->lang('TOTAL_COMMENTS_SPRINTF', $this->gallery_config->get('num_comments')) : '', |
329 | 329 | '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')) : '', |
330 | - '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>') : '', |
|
330 | + '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>') : '', |
|
331 | 331 | )); |
332 | 332 | |
333 | 333 | $this->template->assign_vars(array( |
@@ -425,9 +425,9 @@ discard block |
||
425 | 425 | |
426 | 426 | while ($row = $this->db->sql_fetchrow($result)) |
427 | 427 | { |
428 | - $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); |
|
429 | - $birthday_year = (int) substr($row['user_birthday'], -4); |
|
430 | - $birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : ''; |
|
428 | + $birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); |
|
429 | + $birthday_year = (int) substr($row['user_birthday'], -4); |
|
430 | + $birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : ''; |
|
431 | 431 | |
432 | 432 | $this->template->assign_block_vars('birthdays', array( |
433 | 433 | 'USERNAME' => $birthday_username, |
@@ -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 | { |
@@ -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 | } |
@@ -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'], |
@@ -28,13 +28,13 @@ |
||
28 | 28 | $this->tpl_name = 'gallery_logs'; |
29 | 29 | add_form_key('acp_logs'); |
30 | 30 | |
31 | - $page = $request->variable('page', 0); |
|
32 | - $filter_log = $request->variable('lf', 'all'); |
|
33 | - $sort_days = $request->variable('st', 0); |
|
31 | + $page = $request->variable('page', 0); |
|
32 | + $filter_log = $request->variable('lf', 'all'); |
|
33 | + $sort_days = $request->variable('st', 0); |
|
34 | 34 | $sort_key = $request->variable('sk', 't'); |
35 | 35 | $sort_dir = $request->variable('sd', 'd'); |
36 | - $deletemark = $request->is_set_post('delmarked'); |
|
37 | - $marked = $request->variable('mark', []); |
|
36 | + $deletemark = $request->is_set_post('delmarked'); |
|
37 | + $marked = $request->variable('mark', []); |
|
38 | 38 | |
39 | 39 | $log = $phpbb_container->get('phpbbgallery.core.log'); |
40 | 40 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $phpbb_gallery_url = $phpbb_container->get('phpbbgallery.core.url'); |
31 | 31 | $phpbb_gallery_url->_include('functions_display', 'phpbb'); |
32 | 32 | |
33 | - $phpbb_ext_gallery_core_album =$phpbb_container->get('phpbbgallery.core.album'); |
|
33 | + $phpbb_ext_gallery_core_album = $phpbb_container->get('phpbbgallery.core.album'); |
|
34 | 34 | |
35 | 35 | $phpbb_ext_gallery_core_auth = $phpbb_container->get('phpbbgallery.core.auth'); |
36 | 36 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | function initialise_album() |
156 | 156 | { |
157 | - global $cache, $db, $user, $phpbb_ext_gallery_core_auth, $phpbb_ext_gallery_core_album, $phpbb_ext_gallery_config, $albums_table, $phpbb_ext_gallery_user; |
|
157 | + global $cache, $db, $user, $phpbb_ext_gallery_core_auth, $phpbb_ext_gallery_core_album, $phpbb_ext_gallery_config, $albums_table, $phpbb_ext_gallery_user; |
|
158 | 158 | global $request, $users_table, $phpbb_container; |
159 | 159 | |
160 | 160 | // we will have to initialise $phpbb_ext_gallery_user |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | |
449 | 449 | $this->language = $phpbb_container->get('language'); |
450 | 450 | |
451 | - $phpbb_gallery_url->_include(array('bbcode','message_parser'), 'phpbb'); |
|
451 | + $phpbb_gallery_url->_include(array('bbcode', 'message_parser'), 'phpbb'); |
|
452 | 452 | |
453 | 453 | $album_id = $request->variable('album_id', 0); |
454 | 454 | $phpbb_ext_gallery_core_album->check_user($album_id); |
@@ -837,7 +837,7 @@ discard block |
||
837 | 837 | $sql = 'UPDATE ' . $albums_table . " |
838 | 838 | SET right_id = right_id - $delete_id |
839 | 839 | WHERE right_id > $right_id |
840 | - AND album_user_id = ". (int) $user->data['user_id']; |
|
840 | + AND album_user_id = " . (int) $user->data['user_id']; |
|
841 | 841 | $db->sql_query($sql); |
842 | 842 | } |
843 | 843 | |
@@ -1021,9 +1021,9 @@ discard block |
||
1021 | 1021 | $db->sql_freeresult($result); |
1022 | 1022 | |
1023 | 1023 | // Subscribed images |
1024 | - $start = $request->variable('start', 0); |
|
1025 | - $images_per_page = $phpbb_ext_gallery_config->get('items_per_page'); |
|
1026 | - $total_images = 0; |
|
1024 | + $start = $request->variable('start', 0); |
|
1025 | + $images_per_page = $phpbb_ext_gallery_config->get('items_per_page'); |
|
1026 | + $total_images = 0; |
|
1027 | 1027 | |
1028 | 1028 | $sql = 'SELECT COUNT(image_id) as images |
1029 | 1029 | FROM ' . $watch_table . ' |