aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Moderate.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-17 23:36:35 -0700
committerzotlabs <mike@macgirvin.com>2018-04-17 23:36:35 -0700
commitc53f788cc85f83f00e1b5bec19efd54f1372a12b (patch)
treee9eb3bc4446d17fe00a3c5d015ea2ef944686163 /Zotlabs/Module/Moderate.php
parentfc7d9c235cf845e687095d4f30d32eca4c12bc4a (diff)
downloadvolse-hubzilla-c53f788cc85f83f00e1b5bec19efd54f1372a12b.tar.gz
volse-hubzilla-c53f788cc85f83f00e1b5bec19efd54f1372a12b.tar.bz2
volse-hubzilla-c53f788cc85f83f00e1b5bec19efd54f1372a12b.zip
add alt_pager to mod_moderate, remove legacy $a parameter from all occurrences of alt_pager
Diffstat (limited to 'Zotlabs/Module/Moderate.php')
-rw-r--r--Zotlabs/Module/Moderate.php8
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;
}