From e7c8012794ffe6ac746223a9d67fa338f7360c57 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 6 Oct 2017 22:25:53 +0200 Subject: no need to move $modrated check up --- Zotlabs/Module/Moderate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Moderate.php') diff --git a/Zotlabs/Module/Moderate.php b/Zotlabs/Module/Moderate.php index 9af43420d..8aaa0897a 100644 --- a/Zotlabs/Module/Moderate.php +++ b/Zotlabs/Module/Moderate.php @@ -73,4 +73,4 @@ class Moderate extends \Zotlabs\Web\Controller { } -} \ No newline at end of file +} -- cgit v1.2.3 From f3c374b6fff5122ad8a8a62446a65171ce0fb555 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 19 Oct 2017 11:20:09 +0200 Subject: redirect to be moderated items to /moderate and change the conv link to partent mid in /modrate --- Zotlabs/Module/Moderate.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Module/Moderate.php') 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); -- cgit v1.2.3