diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-09-09 05:25:01 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-09-09 05:25:01 -0700 |
commit | e8c39ff49fdb12461b375db8ab6591ced646f613 (patch) | |
tree | 706932cb6c3ef0465d879ef4b7cbb4833402db16 /mod | |
parent | f1e17b1707ff1e0f8fafc2a5eae095332c0e8f48 (diff) | |
download | volse-hubzilla-e8c39ff49fdb12461b375db8ab6591ced646f613.tar.gz volse-hubzilla-e8c39ff49fdb12461b375db8ab6591ced646f613.tar.bz2 volse-hubzilla-e8c39ff49fdb12461b375db8ab6591ced646f613.zip |
found the missing comment box bug
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dfrn_notify.php | 15 | ||||
-rw-r--r-- | mod/item.php | 5 |
2 files changed, 12 insertions, 8 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 433f69d11..1164bafe3 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -129,10 +129,11 @@ function dfrn_notify_post(&$a) { $item = $r[0]; if($item['uri'] == $item['parent-uri']) { $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' - WHERE `parent-uri` = '%s'", + WHERE `parent-uri` = '%s' AND `uid` = %d", dbesc($when), dbesc(datetime_convert()), - dbesc($item['uri']) + dbesc($item['uri']), + intval($importer['importer_uid']) ); } else { @@ -151,9 +152,10 @@ function dfrn_notify_post(&$a) { intval($item['uid']) ); // who is the last child now? - $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 + $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `uid` = %d ORDER BY `edited` DESC LIMIT 1", - dbesc($item['parent-uri']) + dbesc($item['parent-uri']), + intval($importer['importer_uid']) ); if(count($r)) { q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d LIMIT 1", @@ -261,8 +263,9 @@ function dfrn_notify_post(&$a) { if($importer['notify-flags'] & NOTIFY_COMMENT) { - $myconv = q("SELECT `author-link` FROM `item` WHERE `parent-uri` = '%s'", - dbesc($parent_uri) + $myconv = q("SELECT `author-link` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d", + dbesc($parent_uri), + intval($importer['importer_uid']) ); if(count($myconv)) { foreach($myconv as $conv) { diff --git a/mod/item.php b/mod/item.php index 08f65dca1..20a2488c5 100644 --- a/mod/item.php +++ b/mod/item.php @@ -287,8 +287,9 @@ function item_content(&$a) { intval($item['uid']) ); // who is the last child now? - $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 ORDER BY `edited` DESC LIMIT 1", - dbesc($item['parent-uri']) + $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `uid` = %d ORDER BY `edited` DESC LIMIT 1", + dbesc($item['parent-uri']), + intval($item['uid']) ); if(count($r)) { q("UPDATE `item` SET `last-child` = 1 WHERE `id` = %d LIMIT 1", |