aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Dircensor.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Dircensor.php')
-rw-r--r--Zotlabs/Module/Dircensor.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/Zotlabs/Module/Dircensor.php b/Zotlabs/Module/Dircensor.php
index 44c9148e8..4ce3a81c4 100644
--- a/Zotlabs/Module/Dircensor.php
+++ b/Zotlabs/Module/Dircensor.php
@@ -47,7 +47,12 @@ class Dircensor extends Controller {
Libzotdir::update($xchan, $r[0]['xchan_url'], true, $flag);
- q("update xchan set xchan_censored = %d where xchan_hash = '%s'",
+ q("UPDATE xchan SET xchan_censored = %d WHERE xchan_hash = '%s'",
+ intval($flag),
+ dbesc($xchan)
+ );
+
+ q("UPDATE xtag SET xtag_flags = %d WHERE xtag_hash = '%s'",
intval($flag),
dbesc($xchan)
);
@@ -59,6 +64,13 @@ class Dircensor extends Controller {
info( t('Entry OK') . EOL);
}
+ if (isset($_REQUEST['aj'])) {
+ json_return_and_die([
+ 'success' => 1,
+ 'flag' => $flag
+ ]);
+ }
+
goaway(z_root() . '/directory');
}