diff options
author | zotlabs <mike@macgirvin.com> | 2017-08-24 18:15:19 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-08-24 18:15:19 -0700 |
commit | 341386a95ba68227f60964ab50f9b20989ac6802 (patch) | |
tree | e6dcc16a6bc80edd3a7970e596fecbe7cd82d938 /Zotlabs | |
parent | bd84a3ee08ecbf028af5b3ea672062abc93ab3e1 (diff) | |
download | volse-hubzilla-341386a95ba68227f60964ab50f9b20989ac6802.tar.gz volse-hubzilla-341386a95ba68227f60964ab50f9b20989ac6802.tar.bz2 volse-hubzilla-341386a95ba68227f60964ab50f9b20989ac6802.zip |
make cards searchable
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Item.php | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 4131bab03..a86106b6a 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -736,10 +736,21 @@ class Item extends \Zotlabs\Web\Controller { $parent_mid = $parent_item['mid']; + + // Fallback so that we alway have a thr_parent + + if(!$thr_parent) + $thr_parent = $mid; + + $datarray = array(); + + $item_thread_top = ((! $parent) ? 1 : 0); + + // fix permalinks for cards - if($webpage == ITEM_TYPE_CARD && $pagetitle) { - $plink = z_root() . '/cards/' . $channel['channel_address'] . '/' . $pagetitle; + if($webpage == ITEM_TYPE_CARD) { + $plink = z_root() . '/cards/' . $channel['channel_address'] . '/' . (($pagetitle) ? $pagetitle : substr($mid,0,16)); } if(($parent_item) && ($parent_item['item_type'] == ITEM_TYPE_CARD)) { $r = q("select v from iconfig where iconfig.cat = 'system' and iconfig.k = 'CARD' and iconfig.iid = %d limit 1", @@ -750,15 +761,6 @@ class Item extends \Zotlabs\Web\Controller { } } - // Fallback so that we alway have a thr_parent - - if(!$thr_parent) - $thr_parent = $mid; - - $datarray = array(); - - $item_thread_top = ((! $parent) ? 1 : 0); - if ((! $plink) && ($item_thread_top)) { $plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid; } |