@@ -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'], |
@@ -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')); |
@@ -14,27 +14,27 @@ discard block |
||
14 | 14 | { |
15 | 15 | |
16 | 16 | /** |
17 | - * Gallery Auth Object |
|
18 | - * @var \phpbbgallery\core\auth\auth |
|
19 | - */ |
|
17 | + * Gallery Auth Object |
|
18 | + * @var \phpbbgallery\core\auth\auth |
|
19 | + */ |
|
20 | 20 | protected $auth; |
21 | 21 | |
22 | 22 | /** |
23 | - * Config Object |
|
24 | - * @var \phpbb\config\config |
|
25 | - */ |
|
23 | + * Config Object |
|
24 | + * @var \phpbb\config\config |
|
25 | + */ |
|
26 | 26 | protected $config; |
27 | 27 | |
28 | 28 | /** |
29 | - * Template Object |
|
30 | - * @var \phpbb\template\template |
|
31 | - */ |
|
29 | + * Template Object |
|
30 | + * @var \phpbb\template\template |
|
31 | + */ |
|
32 | 32 | protected $template; |
33 | 33 | |
34 | 34 | /** |
35 | - * User Object |
|
36 | - * @var \phpbb\user |
|
37 | - */ |
|
35 | + * User Object |
|
36 | + * @var \phpbb\user |
|
37 | + */ |
|
38 | 38 | protected $user; |
39 | 39 | |
40 | 40 | /** |
@@ -62,17 +62,17 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
65 | - * User authorization levels output |
|
66 | - * |
|
67 | - * @param int $album_id The current album the user is in. |
|
68 | - * @param int $album_status The albums status bit. |
|
69 | - * @param int $album_user_id The user-id of the album owner. Saves us a call to the cache if it is set. |
|
70 | - * @return null |
|
71 | - * |
|
72 | - * borrowed from phpBB3 |
|
73 | - * @author: phpBB Group |
|
74 | - * @function: gen_forum_auth_level |
|
75 | - */ |
|
65 | + * User authorization levels output |
|
66 | + * |
|
67 | + * @param int $album_id The current album the user is in. |
|
68 | + * @param int $album_status The albums status bit. |
|
69 | + * @param int $album_user_id The user-id of the album owner. Saves us a call to the cache if it is set. |
|
70 | + * @return null |
|
71 | + * |
|
72 | + * borrowed from phpBB3 |
|
73 | + * @author: phpBB Group |
|
74 | + * @function: gen_forum_auth_level |
|
75 | + */ |
|
76 | 76 | public function display($album_id, $album_status, $album_user_id = -1) |
77 | 77 | { |
78 | 78 | $locked = ($album_status == ITEM_LOCKED && !$this->auth->acl_check('m_', $album_id, $album_user_id)) ? true : false; |
@@ -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 |
@@ -67,8 +67,7 @@ |
||
67 | 67 | if (confirm_box(true)) |
68 | 68 | { |
69 | 69 | $log->delete_logs($marked); |
70 | - } |
|
71 | - else |
|
70 | + } else |
|
72 | 71 | { |
73 | 72 | confirm_box(false, $this->language->lang('CONFIRM_OPERATION'), build_hidden_fields([ |
74 | 73 | 'page' => $page, |