aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-31 13:38:19 -0800
committerzotlabs <mike@macgirvin.com>2016-12-31 13:38:19 -0800
commit444e938e2d34044f1aa7d04110e0e391caafeea3 (patch)
treeae6422f70fd5ea3592d70bcd58345cecd9137ee8 /include/zot.php
parente5a6c0a94da18fc2e9b1c8ab4c99ecfa615405e4 (diff)
downloadvolse-hubzilla-444e938e2d34044f1aa7d04110e0e391caafeea3.tar.gz
volse-hubzilla-444e938e2d34044f1aa7d04110e0e391caafeea3.tar.bz2
volse-hubzilla-444e938e2d34044f1aa7d04110e0e391caafeea3.zip
issues #629, #635 - edited post arriving from downstream source was not being rejected
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 853c8eb9e..43749840a 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1943,6 +1943,20 @@ function update_imported_item($sender, $item, $orig, $uid) {
unset($item['item_private']);
}
+ // Subtle issue where we might receive an edit item update from a downstream source.
+ // Ignore unless it comes from upstream.
+
+ $x = q("select item_wall from item where mid = '%s' and uid = %d limit 1",
+ dbesc($item['mid']),
+ intval($uid)
+ );
+
+ if($x && $x[0]['item_wall'] == 1 && $item['item_wall'] == 0) {
+ notice('remote wall update ignored');
+ return;
+ }
+
+
$x = item_store_update($item);
// If we're updating an event that we've saved locally, we store the item info first