aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/channel.php2
-rw-r--r--mod/home.php2
-rw-r--r--mod/network.php22
3 files changed, 12 insertions, 14 deletions
diff --git a/mod/channel.php b/mod/channel.php
index 16aac2e51..022def2a8 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -159,7 +159,7 @@ function channel_content(&$a, $update = 0, $load = false) {
$simple_update = (($update) ? " AND item_unseen = 1 " : '');
if($update && $_SESSION['loadtime'])
- $simple_update = " AND ( item_unseen = 1 or item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
+ $simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
if($load)
$simple_update = '';
diff --git a/mod/home.php b/mod/home.php
index 9b2cc0e6d..f4358da5c 100644
--- a/mod/home.php
+++ b/mod/home.php
@@ -185,7 +185,7 @@ function home_content(&$a, $update = 0, $load = false) {
$simple_update = (($update) ? " and item.item_unseen = 1 " : '');
if($update && $_SESSION['loadtime'])
- $simple_update = " AND ( item_unseen = 1 or item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
+ $simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
if($load)
$simple_update = '';
diff --git a/mod/network.php b/mod/network.php
index 0cf535769..8db3bfd58 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -396,7 +396,7 @@ function network_content(&$a, $update = 0, $load = false) {
// which are both ITEM_UNSEEN and have "changed" since that time. Cross fingers...
if($update && $_SESSION['loadtime'])
- $simple_update = " AND ( item_unseen = 1 or item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
+ $simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
if($load)
$simple_update = '';
@@ -444,17 +444,15 @@ function network_content(&$a, $update = 0, $load = false) {
}
else {
- if(! $firehose) {
- // this is an update
- $r = q("SELECT item.parent AS item_id FROM item
- left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
- WHERE true $uids AND item.item_restrict = 0 $simple_update
- and ((abook.abook_flags & %d) = 0 or abook.abook_flags is null)
- $sql_extra3 $sql_extra $sql_nets ",
- intval(ABOOK_FLAG_BLOCKED)
- );
- $_SESSION['loadtime'] = datetime_convert();
- }
+ // this is an update
+ $r = q("SELECT item.parent AS item_id FROM item
+ left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
+ WHERE true $uids AND item.item_restrict = 0 $simple_update
+ and ((abook.abook_flags & %d) = 0 or abook.abook_flags is null)
+ $sql_extra3 $sql_extra $sql_nets ",
+ intval(ABOOK_FLAG_BLOCKED)
+ );
+ $_SESSION['loadtime'] = datetime_convert();
}
// Then fetch all the children of the parents that are on this page