@@ -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); |
@@ -684,7 +684,7 @@ 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'])) : '', |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | 'S_STATUS_LOCKED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_LOCKED) ? true : false, |
693 | 693 | |
694 | 694 | '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'])*/ : '', |
695 | - '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 | + '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']) : '', |
|
696 | 696 | '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')), |
697 | 697 | )); |
698 | 698 | } |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | $album_user_id = $image_data['album_user_id']; |
371 | 371 | |
372 | 372 | //@todo: $rating = new phpbb_gallery_image_rating($image_data['image_id'], $image_data, $image_data); |
373 | - $image_data['rating'] = '0';//@todo: $rating->get_image_rating(false, false); |
|
373 | + $image_data['rating'] = '0'; //@todo: $rating->get_image_rating(false, false); |
|
374 | 374 | //@todo: unset($rating); |
375 | 375 | |
376 | 376 | $s_user_allowed = (($image_data['image_user_id'] == $this->user->data['user_id']) && ($album_status != \phpbbgallery\core\block::ALBUM_LOCKED)); |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | |
429 | 429 | '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, |
430 | 430 | 'S_IMAGE_REPORTED' => $image_data['image_reported'], |
431 | - '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']) : '', |
|
431 | + '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']) : '', |
|
432 | 432 | 'S_STATUS_APPROVED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_APPROVED) ? true : false, |
433 | 433 | 'S_STATUS_UNAPPROVED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_UNAPPROVED) ? true : false, |
434 | 434 | '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'])) : '', |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | 'S_STATUS_LOCKED' => ($image_data['image_status'] == (int) \phpbbgallery\core\block::STATUS_LOCKED) ? true : false, |
437 | 437 | |
438 | 438 | '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'])*/ : '', |
439 | - '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']) : '', |
|
439 | + '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']) : '', |
|
440 | 440 | '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')), |
441 | 441 | |
442 | 442 | 'S_CONTEST_RANK' => $image_data['image_contest_rank'], |