aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Display.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-03-23 10:03:54 +0100
committerMario Vavti <mario@mariovavti.com>2018-03-23 10:03:54 +0100
commit376091010f0c4613c76e30d81285c5c5f54f56d5 (patch)
tree6a61747e2ba53c507488d87e33bda6eba7ab84ef /Zotlabs/Module/Display.php
parentac967db4e87761c1be98d6f548ecedd55d942fea (diff)
parentaf8cbf000fb1433b7c7d2c6c4543980f01ba69a9 (diff)
downloadvolse-hubzilla-376091010f0c4613c76e30d81285c5c5f54f56d5.tar.gz
volse-hubzilla-376091010f0c4613c76e30d81285c5c5f54f56d5.tar.bz2
volse-hubzilla-376091010f0c4613c76e30d81285c5c5f54f56d5.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module/Display.php')
-rw-r--r--Zotlabs/Module/Display.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 8e8a1ed24..fa29ce66c 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -134,6 +134,40 @@ class Display extends \Zotlabs\Web\Controller {
return '';
}
}
+ if($target_item['item_type'] == ITEM_TYPE_ARTICLE) {
+ $x = q("select * from channel where channel_id = %d limit 1",
+ intval($target_item['uid'])
+ );
+ $y = q("select * from iconfig left join item on iconfig.iid = item.id
+ where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'ARTICLE' and item.id = %d limit 1",
+ intval($target_item['uid']),
+ intval($target_item['id'])
+ );
+ if($x && $y) {
+ goaway(z_root() . '/articles/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
+ }
+ else {
+ notice( t('Page not found.') . EOL);
+ return '';
+ }
+ }
+ if($target_item['item_type'] == ITEM_TYPE_CARD) {
+ $x = q("select * from channel where channel_id = %d limit 1",
+ intval($target_item['uid'])
+ );
+ $y = q("select * from iconfig left join item on iconfig.iid = item.id
+ where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'CARD' and item.id = %d limit 1",
+ intval($target_item['uid']),
+ intval($target_item['id'])
+ );
+ if($x && $y) {
+ goaway(z_root() . '/cards/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
+ }
+ else {
+ notice( t('Page not found.') . EOL);
+ return '';
+ }
+ }
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);