diff options
author | friendica <info@friendica.com> | 2015-02-26 14:20:43 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-02-26 14:20:43 -0800 |
commit | 09f80270defdd2dfbf5cf4cc9da0cae686874aba (patch) | |
tree | 39c12c03e092f2d326de8c22bf8beaac5a84cd6e | |
parent | ac3384e661115fac5d771f62fc3eaa1587e5326f (diff) | |
download | volse-hubzilla-09f80270defdd2dfbf5cf4cc9da0cae686874aba.tar.gz volse-hubzilla-09f80270defdd2dfbf5cf4cc9da0cae686874aba.tar.bz2 volse-hubzilla-09f80270defdd2dfbf5cf4cc9da0cae686874aba.zip |
loop breaker
-rw-r--r-- | include/zot.php | 16 | ||||
-rw-r--r-- | version.inc | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/zot.php b/include/zot.php index 455702b06..e290697b6 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1856,7 +1856,23 @@ function delete_imported_item($sender,$item,$uid,$relay) { logger('delete_imported_item: item was already deleted'); if(! $relay) return false; + + // This is a bit hackish, but may have to suffice until the notification/delivery loop is optimised + // a bit further. We're going to strip the ITEM_ORIGIN on this item if it's a comment, because + // it was already deleted, and we're already relaying, and this ensures that no other process or + // code path downstream can relay it again (causing a loop). Since it's already gone it's not coming + // back, and we aren't going to (or shouldn't at any rate) delete it again in the future - so losing + // this information from the metadata should have no other discernible impact. + + if(($r[0]['id'] != $r[0]['parent']) && ($r[0]['item_flags'] & ITEM_ORIGIN)) { + $x = q("update item set item_flags = %d where id = %d and uid = %d", + intval($r[0]['item_flags'] ^ ITEM_ORIGIN), + intval($r[0]['id']), + intval($r[0]['uid']) + ); + } } + require_once('include/items.php'); diff --git a/version.inc b/version.inc index 710b61eed..1774fb864 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-02-25.954 +2015-02-26.955 |