aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Item.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 901f54c72..3eac2b6a0 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -193,6 +193,25 @@ class Item extends Controller {
killme();
}
+
+ if(argc() > 1 && argv(1) !== 'drop') {
+ $x = q("select uid, item_wall, llink, mid from item where mid = '%s' ",
+ dbesc(z_root() . '/item/' . argv(1))
+ );
+ if($x) {
+ foreach($x as $xv) {
+ if (intval($xv['item_wall'])) {
+ $c = channelx_by_n($xv['uid']);
+ if ($c) {
+ goaway($c['xchan_url'] . '?mid=' . gen_link_id($xv['mid']));
+ }
+ }
+ }
+ goaway($x[0]['llink']);
+ }
+ http_status_exit(404, 'Not found');
+ }
+
}