aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-12 17:45:25 -0800
committerfriendica <info@friendica.com>2015-02-12 17:45:25 -0800
commitda2349bb6a85d13f0aa29046bef3021cf0c884ba (patch)
treec6746dacc91a9f073bca67869074cc81825964df /mod/item.php
parent94a9aa9610647935a10ba6d4d8f70c955a9d7243 (diff)
downloadvolse-hubzilla-da2349bb6a85d13f0aa29046bef3021cf0c884ba.tar.gz
volse-hubzilla-da2349bb6a85d13f0aa29046bef3021cf0c884ba.tar.bz2
volse-hubzilla-da2349bb6a85d13f0aa29046bef3021cf0c884ba.zip
provide relief to sites that are severely impacted by the slow ITEM_UNSEEN searches. This does not incorporate any other flag optimisations as that will require a major DB update and possibly involve significant downtime. This is just to bite off a little chunk now and provide some much needed relief.
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/mod/item.php b/mod/item.php
index ef0491895..99d28400b 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -643,8 +643,7 @@ function item_post(&$a) {
}
}
- if(local_channel() != $profile_uid)
- $item_flags |= ITEM_UNSEEN;
+ $item_unseen = ((local_channel() != $profile_uid) ? 1 : 0);
if($post_type === 'wall' || $post_type === 'wall-comment')
$item_flags = $item_flags | ITEM_WALL;
@@ -694,7 +693,7 @@ function item_post(&$a) {
$datarray['aid'] = $channel['channel_account_id'];
$datarray['uid'] = $profile_uid;
-
+
$datarray['owner_xchan'] = (($owner_hash) ? $owner_hash : $owner_xchan['xchan_hash']);
$datarray['author_xchan'] = $observer['xchan_hash'];
$datarray['created'] = $created;
@@ -729,6 +728,7 @@ function item_post(&$a) {
$datarray['term'] = $post_tags;
$datarray['plink'] = $plink;
$datarray['route'] = $route;
+ $datarray['item_unseen'] = $item_unseen;
// preview mode - prepare the body for display and send it via json