diff options
author | Friendika <info@friendika.com> | 2011-02-04 04:25:53 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-02-04 04:25:53 -0800 |
commit | 2a9bfae2b7341ebe4d420c627867160c7e1427d9 (patch) | |
tree | f2791a2e6302d57c9478863a2efc16abaa9a7f64 /include/items.php | |
parent | 5c98032893d945644c6da6bdf99484c0c8cb7e45 (diff) | |
download | volse-hubzilla-2a9bfae2b7341ebe4d420c627867160c7e1427d9.tar.gz volse-hubzilla-2a9bfae2b7341ebe4d420c627867160c7e1427d9.tar.bz2 volse-hubzilla-2a9bfae2b7341ebe4d420c627867160c7e1427d9.zip |
prevent runaway notifications when parent=0 due to race condition
Diffstat (limited to 'include/items.php')
-rw-r--r-- | include/items.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/items.php b/include/items.php index 45d8b62c0..0c9d4cfc2 100644 --- a/include/items.php +++ b/include/items.php @@ -688,11 +688,12 @@ function item_store($arr,$force_parent = false) { $arr['parent-uri'] = $r[0]['parent-uri']; } - $parent_id = $r[0]['id']; - $allow_cid = $r[0]['allow_cid']; - $allow_gid = $r[0]['allow_gid']; - $deny_cid = $r[0]['deny_cid']; - $deny_gid = $r[0]['deny_gid']; + $parent_id = $r[0]['id']; + $parent_deleted = $r[0]['deleted']; + $allow_cid = $r[0]['allow_cid']; + $allow_gid = $r[0]['allow_gid']; + $deny_cid = $r[0]['deny_cid']; + $deny_gid = $r[0]['deny_gid']; } else { @@ -750,13 +751,14 @@ function item_store($arr,$force_parent = false) { // Set parent id - and also make sure to inherit the parent's ACL's. $r = q("UPDATE `item` SET `parent` = %d, `allow_cid` = '%s', `allow_gid` = '%s', - `deny_cid` = '%s', `deny_gid` = '%s', `private` = %d WHERE `id` = %d LIMIT 1", + `deny_cid` = '%s', `deny_gid` = '%s', `private` = %d, `deleted` = $d WHERE `id` = %d LIMIT 1", intval($parent_id), dbesc($allow_cid), dbesc($allow_gid), dbesc($deny_cid), dbesc($deny_gid), intval($private), + intval($parent_deleted), intval($current_post) ); |