aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Moderate.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-20 12:45:05 -0700
committerzotlabs <mike@macgirvin.com>2017-06-20 12:45:05 -0700
commit07a8151ae66f1ccf00017f521219afdc2f5370ec (patch)
treeb1cc2061bd2409d8f66e7401171d03f4a068d2ef /Zotlabs/Module/Moderate.php
parent1b31c9f8a875db70154b8512b1e2f96f0a6731cd (diff)
downloadvolse-hubzilla-07a8151ae66f1ccf00017f521219afdc2f5370ec.tar.gz
volse-hubzilla-07a8151ae66f1ccf00017f521219afdc2f5370ec.tar.bz2
volse-hubzilla-07a8151ae66f1ccf00017f521219afdc2f5370ec.zip
more anon comment fixes
Diffstat (limited to 'Zotlabs/Module/Moderate.php')
-rw-r--r--Zotlabs/Module/Moderate.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/Zotlabs/Module/Moderate.php b/Zotlabs/Module/Moderate.php
index b7f05e4b2..92df58858 100644
--- a/Zotlabs/Module/Moderate.php
+++ b/Zotlabs/Module/Moderate.php
@@ -28,8 +28,6 @@ class Moderate extends \Zotlabs\Web\Controller {
intval(ITEM_MODERATED)
);
-
-
if($r) {
if($action === 'approve') {
q("update item set item_blocked = 0 where uid = %d and id = %d",
@@ -42,19 +40,21 @@ class Moderate extends \Zotlabs\Web\Controller {
drop_item($post_id,false);
notice( t('Comment deleted') . EOL);
}
+
+ $r = q("select * from item where id = %d",
+ intval($post_id)
+ );
+ if($r) {
+ xchan_query($r);
+ $sync_item = fetch_post_tags($r);
+ build_sync_packet(local_channel(),array('item' => array(encode_item($sync_item[0],true))));
+ }
+ if($action === 'approve') {
+ \Zotlabs\Daemon\Master::Summon(array('Notifier', 'comment-new', $post_id));
+ }
+ goaway(z_root() . '/moderate');
}
-
- $r = q("select * from item where id = %d",
- intval($post_id)
- );
- if($r) {
- xchan_query($r);
- $sync_item = fetch_post_tags($r);
- build_sync_packet(local_channel(),array('item' => array(encode_item($sync_item[0],true))));
- }
- 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)