aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Display.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-09-05 23:18:02 +0200
committerMario Vavti <mario@mariovavti.com>2017-09-05 23:18:02 +0200
commit68a91ec3ea7eaf56689545535a7481a838eff4da (patch)
tree35f7537f9c957185966afb6d45df955c7d3995f8 /Zotlabs/Module/Display.php
parentc8000fca1f2ee379b62b473a00838af9a48bc4b6 (diff)
downloadvolse-hubzilla-68a91ec3ea7eaf56689545535a7481a838eff4da.tar.gz
volse-hubzilla-68a91ec3ea7eaf56689545535a7481a838eff4da.tar.bz2
volse-hubzilla-68a91ec3ea7eaf56689545535a7481a838eff4da.zip
32 characters are often not enough to distinguish gnu-social mids - use the entire mid. in /display if we are not dealing with posts (eg likes) provide the thr_parent mid as bParam_mid so we can still adress the right post in javascript
Diffstat (limited to 'Zotlabs/Module/Display.php')
-rw-r--r--Zotlabs/Module/Display.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 68da3e247..11c75219d 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -89,7 +89,7 @@ class Display extends \Zotlabs\Web\Controller {
if($decoded)
$item_hash = $decoded;
- $r = q("select id, uid, mid, parent_mid, item_type, item_deleted from item where mid like '%s' limit 1",
+ $r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted from item where mid like '%s' limit 1",
dbesc($item_hash . '%')
);
@@ -165,7 +165,8 @@ class Display extends \Zotlabs\Web\Controller {
'$dend' => '',
'$dbegin' => '',
'$verb' => '',
- '$mid' => $item_hash
+ //if the target item is not a post (eg a like) want to address its thread parent
+ '$mid' => (($target_item['verb'] == ACTIVITY_POST) ? $item_hash : $target_item['thr_parent'])
));
head_add_link([