aboutsummaryrefslogtreecommitdiffstats
path: root/mod/display.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-21 16:46:28 -0700
committerfriendica <info@friendica.com>2015-03-21 16:46:28 -0700
commita2e3ca6fd8ba8c0630de089d772fdd668b84428b (patch)
tree66396776eb293108450c98f2ec1047cafda0fcb5 /mod/display.php
parent85dd08427c6067554762854c584eae0ca90fea43 (diff)
downloadvolse-hubzilla-a2e3ca6fd8ba8c0630de089d772fdd668b84428b.tar.gz
volse-hubzilla-a2e3ca6fd8ba8c0630de089d772fdd668b84428b.tar.bz2
volse-hubzilla-a2e3ca6fd8ba8c0630de089d772fdd668b84428b.zip
add loadtime search to channel and fix it for home. display and search need further investigation
Diffstat (limited to 'mod/display.php')
-rw-r--r--mod/display.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/display.php b/mod/display.php
index d4a1acc5d..b5daea2de 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -5,6 +5,10 @@ function display_content(&$a, $update = 0, $load = false) {
// logger("mod-display: update = $update load = $load");
+ if($load)
+ $_SESSION['loadtime'] = datetime_convert();
+
+
if(intval(get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) {
notice( t('Public access denied.') . EOL);
return;
@@ -105,6 +109,15 @@ function display_content(&$a, $update = 0, $load = false) {
}
+ $simple_update = (($update) ? " AND item_unseen = 1 " : '');
+
+ if($update && $_SESSION['loadtime'])
+ $simple_update .= " and item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ";
+ if($load)
+ $simple_update = '';
+
+
+
if((! $update) && (! $load)) {