diff options
author | Andrew Manning <tamanning@zoho.com> | 2018-03-27 21:11:34 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2018-03-27 21:11:34 -0400 |
commit | 1dc795722a8e748ebb98e8fab778cd4686a0654f (patch) | |
tree | 4f4a4e8dea10090106c4d54a02c6860332cd9df4 /Zotlabs/Module/Display.php | |
parent | dcd658f12ea60945678717e3c310e94ece7b1f96 (diff) | |
parent | c98776923a3aed4a0a17ca1412787de3b718eba9 (diff) | |
download | volse-hubzilla-1dc795722a8e748ebb98e8fab778cd4686a0654f.tar.gz volse-hubzilla-1dc795722a8e748ebb98e8fab778cd4686a0654f.tar.bz2 volse-hubzilla-1dc795722a8e748ebb98e8fab778cd4686a0654f.zip |
Merge branch 'dev' into oauth2
Diffstat (limited to 'Zotlabs/Module/Display.php')
-rw-r--r-- | Zotlabs/Module/Display.php | 34 |
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); |