aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-26 19:55:52 -0700
committerfriendica <info@friendica.com>2015-03-26 19:55:52 -0700
commit0bb89778d382fc5758354c6986130ce1ddba7d4c (patch)
tree8c321117f634f883a46e5848f88ba3540817f538 /mod
parentfe2d5969d26c0506349b4f7d2ad54f820424f063 (diff)
downloadvolse-hubzilla-0bb89778d382fc5758354c6986130ce1ddba7d4c.tar.gz
volse-hubzilla-0bb89778d382fc5758354c6986130ce1ddba7d4c.tar.bz2
volse-hubzilla-0bb89778d382fc5758354c6986130ce1ddba7d4c.zip
add channel_lastpost timestamp to help optimise some outrageously expensive queries.
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/mod/item.php b/mod/item.php
index 8aa3d8136..fa40aea03 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -860,6 +860,13 @@ function item_post(&$a) {
'otype' => 'item'
));
}
+
+ if($uid && $uid == $profile_uid && (! $datarray['item_restrict'])) {
+ q("update channel set channel_lastpost = '%s' where channel_id = %d",
+ dbesc(datetime_convert()),
+ intval($uid)
+ );
+ }
}
// photo comments turn the corresponding item visible to the profile wall