Skip to content

Commit 47682f4

Browse files
author
Leinad4Mind
committed
Fix log on moderation page
1 parent 18a120d commit 47682f4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

core/config/services_controller.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ services:
193193
- '@phpbbgallery.core.image'
194194
- '@phpbbgallery.core.notification.helper'
195195
- '@phpbbgallery.core.url'
196+
- '@phpbbgallery.core.config'
196197
- '@phpbbgallery.core.log'
197198
- '@phpbbgallery.core.report'
198199
- '@user_loader'

core/controller/moderate.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ class moderate
6262
/** @var \phpbbgallery\core\url */
6363
protected $url;
6464

65+
/** @var \phpbbgallery\core\config */
66+
protected $gallery_config;
67+
6568
/** @var \phpbbgallery\core\log */
6669
protected $gallery_log;
6770

@@ -94,6 +97,7 @@ class moderate
9497
* @param \phpbbgallery\core\image\image $image
9598
* @param \phpbbgallery\core\notification\helper $notification_helper
9699
* @param \phpbbgallery\core\url $url
100+
* @param \phpbbgallery\core\config $gallery_config
97101
* @param \phpbbgallery\core\log $gallery_log
98102
* @param \phpbbgallery\core\report $report
99103
* @param \phpbb\user_loader $user_loader
@@ -106,7 +110,7 @@ public function __construct(\phpbb\config\config $config, \phpbb\request\request
106110
\phpbb\template\template $template, \phpbb\user $user, \phpbb\language\language $language,
107111
\phpbb\controller\helper $helper, \phpbbgallery\core\album\display $display, \phpbbgallery\core\moderate $moderate,
108112
\phpbbgallery\core\auth\auth $gallery_auth, \phpbbgallery\core\misc $misc, \phpbbgallery\core\album\album $album, \phpbbgallery\core\image\image $image,
109-
\phpbbgallery\core\notification\helper $notification_helper, \phpbbgallery\core\url $url, \phpbbgallery\core\log $gallery_log,
113+
\phpbbgallery\core\notification\helper $notification_helper, \phpbbgallery\core\url $url, \phpbbgallery\core\config $gallery_config, \phpbbgallery\core\log $gallery_log,
110114
\phpbbgallery\core\report $report, \phpbb\user_loader $user_loader,
111115
$root_path, $php_ext)
112116
{
@@ -124,6 +128,7 @@ public function __construct(\phpbb\config\config $config, \phpbb\request\request
124128
$this->image = $image;
125129
$this->notification_helper = $notification_helper;
126130
$this->url = $url;
131+
$this->gallery_config = $gallery_config;
127132
$this->gallery_log = $gallery_log;
128133
$this->report = $report;
129134
$this->user_loader = $user_loader;
@@ -324,7 +329,8 @@ public function action_log($page, $album_id)
324329
'U_GALLERY_MCP_LOGS' => $album_id > 0 ? $this->helper->route('phpbbgallery_core_moderate_action_log_album', array('album_id' => $album_id)) : $this->helper->route('phpbbgallery_core_moderate_action_log'),
325330
'U_ALBUM_NAME' => $album_id > 0 ? $album['album_name'] : false,
326331
));
327-
$this->gallery_log->build_list('moderator', 0, $page, $album_id);
332+
$limit = $this->gallery_config->get('items_per_page');
333+
$this->gallery_log->build_list('moderator', $limit, $page, $album_id);
328334
return $this->helper->render('gallery/moderate_actions.html', $this->language->lang('GALLERY'));
329335
}
330336

0 commit comments

Comments
 (0)