aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-28 17:25:00 -0700
committerfriendica <info@friendica.com>2014-08-28 17:25:00 -0700
commitae3047791c5d7a9bd589509bf13dd1c740e6639f (patch)
tree1170a37b7e61a8d2b5cebaf589822123e69b00d4
parentb27e21472bb6fadcadba5e614cd71a8ce55f7dc1 (diff)
downloadvolse-hubzilla-ae3047791c5d7a9bd589509bf13dd1c740e6639f.tar.gz
volse-hubzilla-ae3047791c5d7a9bd589509bf13dd1c740e6639f.tar.bz2
volse-hubzilla-ae3047791c5d7a9bd589509bf13dd1c740e6639f.zip
when updating the commented timestamp on the parent post (item_store) don't include any time travelling posts. They can mess up the conversation sort order in a big way until they're actually published.
-rw-r--r--include/conversation.php2
-rwxr-xr-xinclude/items.php5
2 files changed, 5 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php
index b14e609dd..15ce8ce25 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1270,6 +1270,8 @@ function conv_sort($arr,$order) {
}
}
+logger('conv_sort: ' . print_r($ret,true));
+
return $ret;
}
diff --git a/include/items.php b/include/items.php
index cf9b86f06..2a4242ea6 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2029,9 +2029,10 @@ function item_store($arr,$allow_exec = false) {
// update the commented timestamp on the parent
- $z = q("select max(created) as commented from item where parent_mid = '%s' and uid = %d ",
+ $z = q("select max(created) as commented from item where parent_mid = '%s' and uid = %d and not ( item_restrict & %d ) ",
dbesc($arr['parent_mid']),
- intval($arr['uid'])
+ intval($arr['uid']),
+ intval(ITEM_DELAYED_PUBLISH)
);
q("UPDATE item set commented = '%s', changed = '%s' WHERE id = %d LIMIT 1",