aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-11-19 11:46:29 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-11-19 11:46:29 -0800
commited87dbc1414b7da2f58213671539c5570a416809 (patch)
tree7c24f3ad4970cb63ea6add02be62ef387e83db5f
parenta17f280f7da6d99287f2ed837f4ca9cc14a74da9 (diff)
downloadvolse-hubzilla-ed87dbc1414b7da2f58213671539c5570a416809.tar.gz
volse-hubzilla-ed87dbc1414b7da2f58213671539c5570a416809.tar.bz2
volse-hubzilla-ed87dbc1414b7da2f58213671539c5570a416809.zip
issue #173
-rwxr-xr-xmod/subthread.php12
-rw-r--r--version.inc2
2 files changed, 10 insertions, 4 deletions
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 a1de68ee0..d6100d73a 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-11-18.1220
+2015-11-19.1221