aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Moderate.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-10-19 16:27:24 -0700
committerzotlabs <mike@macgirvin.com>2017-10-19 16:27:24 -0700
commitcdb1bc9be6fbc09caff62c0153386cc58a2bfbd9 (patch)
tree2069795706e4d54b740ee5ef6d8469c75d331b34 /Zotlabs/Module/Moderate.php
parent656ec585b22e62b496fe96002ee8ca7f9fd02d64 (diff)
parent52183f8bf85777068839490c37a882191f216fe4 (diff)
downloadvolse-hubzilla-cdb1bc9be6fbc09caff62c0153386cc58a2bfbd9.tar.gz
volse-hubzilla-cdb1bc9be6fbc09caff62c0153386cc58a2bfbd9.tar.bz2
volse-hubzilla-cdb1bc9be6fbc09caff62c0153386cc58a2bfbd9.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Module/Moderate.php')
-rw-r--r--Zotlabs/Module/Moderate.php22
1 files changed, 18 insertions, 4 deletions
diff --git a/Zotlabs/Module/Moderate.php b/Zotlabs/Module/Moderate.php
index 8aaa0897a..cf1625a6b 100644
--- a/Zotlabs/Module/Moderate.php
+++ b/Zotlabs/Module/Moderate.php
@@ -14,6 +14,24 @@ class Moderate extends \Zotlabs\Web\Controller {
return;
}
+ //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",
+ intval(local_channel()),
+ intval(ITEM_MODERATED)
+ );
+ }
+
+ //show a single item
+ 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",
+ intval($post_id),
+ intval(local_channel()),
+ intval(ITEM_MODERATED)
+ );
+ }
if(argc() > 2) {
$post_id = intval(argv(1));
@@ -55,10 +73,6 @@ class Moderate extends \Zotlabs\Web\Controller {
goaway(z_root() . '/moderate');
}
}
- $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",
- intval(local_channel()),
- intval(ITEM_MODERATED)
- );
if($r) {
xchan_query($r);