diff options
author | jeroenpraat <jeroenpraat@xs4all.nl> | 2015-11-20 00:40:32 +0100 |
---|---|---|
committer | jeroenpraat <jeroenpraat@xs4all.nl> | 2015-11-20 00:40:32 +0100 |
commit | e537d53389f383cf26c5d9c1da05483c09aa439d (patch) | |
tree | 9f6d9c5952e65ce6192a50910d0faebb09c06675 | |
parent | a890ee6864f5a3b727ac558b64f9a208345d9fb7 (diff) | |
parent | 4f81d6451783f8f51b10b2636d68cde444041dc1 (diff) | |
download | volse-hubzilla-e537d53389f383cf26c5d9c1da05483c09aa439d.tar.gz volse-hubzilla-e537d53389f383cf26c5d9c1da05483c09aa439d.tar.bz2 volse-hubzilla-e537d53389f383cf26c5d9c1da05483c09aa439d.zip |
Merge branch 'master' of https://github.com/redmatrix/hubzilla
-rwxr-xr-x | boot.php | 1 | ||||
-rwxr-xr-x | mod/subthread.php | 12 | ||||
-rw-r--r-- | version.inc | 2 |
3 files changed, 11 insertions, 4 deletions
@@ -83,6 +83,7 @@ $DIRECTORY_FALLBACK_SERVERS = array( 'https://hubzilla.site', 'https://red.zottel.red', 'https://gravizot.de', + 'https://blablanet.com', 'https://my.federated.social' ); diff --git a/mod/subthread.php b/mod/subthread.php index 162545a2f..74d742b6a 100755 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -11,18 +11,24 @@ function subthread_content(&$a) { return; } + $item_id = ((argc() > 2) ? notags(trim(argv(2))) : 0); + if(argv(1) === 'sub') $activity = ACTIVITY_FOLLOW; elseif(argv(1) === 'unsub') $activity = ACTIVITY_UNFOLLOW; - $item_id = ((argc() > 2) ? notags(trim(argv(2))) : 0); - $r = q("SELECT * FROM `item` WHERE `parent` = '%s' OR `parent_mid` = '%s' and parent = id LIMIT 1", - dbesc($item_id), + $r = q("SELECT parent FROM item WHERE id = '%s'", dbesc($item_id) ); + if($r) { + $r = q("select * from item where id = parent and id = %d limit 1", + dbesc($r[0]['parent']) + ); + } + if((! $item_id) || (! $r)) { logger('subthread: no item ' . $item_id); return; diff --git a/version.inc b/version.inc index 369ed3cb7..d6100d73a 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-11-18.1221 +2015-11-19.1221 |