add loadtime search to channel and fix it for home. display and search need further investigation
This commit is contained in:
@@ -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)) {
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user