diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-04-19 08:28:42 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-04-19 08:28:42 +0200 |
commit | 92b08f1f07a25976342dc885331ecb1531e256aa (patch) | |
tree | 4127afeee7d8a3b710863d9ad022fed2b82a8ebc /Zotlabs/Module/Moderate.php | |
parent | 16dcbc1e674cef1d51dc0e81f91d7055350f9990 (diff) | |
parent | a81011333fc113006fbf49b561915532f6cd2509 (diff) | |
download | volse-hubzilla-92b08f1f07a25976342dc885331ecb1531e256aa.tar.gz volse-hubzilla-92b08f1f07a25976342dc885331ecb1531e256aa.tar.bz2 volse-hubzilla-92b08f1f07a25976342dc885331ecb1531e256aa.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module/Moderate.php')
-rw-r--r-- | Zotlabs/Module/Moderate.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Zotlabs/Module/Moderate.php b/Zotlabs/Module/Moderate.php index 10c8ab8f2..a7c98e05e 100644 --- a/Zotlabs/Module/Moderate.php +++ b/Zotlabs/Module/Moderate.php @@ -14,9 +14,12 @@ class Moderate extends \Zotlabs\Web\Controller { return; } + \App::set_pager_itemspage(60); + $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start'])); + //show all items if(argc() == 1) { - $r = q("select item.id as item_id, item.* from item where item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc limit 60", + $r = q("select item.id as item_id, item.* from item where item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc $pager_sql", intval(local_channel()), intval(ITEM_MODERATED) ); @@ -26,7 +29,7 @@ class Moderate extends \Zotlabs\Web\Controller { if(argc() == 2) { $post_id = intval(argv(1)); - $r = q("select item.id as item_id, item.* from item where item.id = %d and item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc limit 60", + $r = q("select item.id as item_id, item.* from item where item.id = %d and item.uid = %d and item_blocked = %d and item_deleted = 0 order by created desc $pager_sql", intval($post_id), intval(local_channel()), intval(ITEM_MODERATED) @@ -92,6 +95,7 @@ class Moderate extends \Zotlabs\Web\Controller { } $o = conversation($items,'moderate',false,'traditional'); + $o .= alt_pager(count($items)); return $o; } |