diff options
Diffstat (limited to 'app/views/index/normal.phtml')
| -rw-r--r-- | app/views/index/normal.phtml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index 38ce30276..aca3b8f0a 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -8,9 +8,9 @@ if (!Minz_Request::paramBoolean('ajax')) { call_user_func($this->callbackBeforeEntries, $this); -$display_today = true; -$display_yesterday = true; -$display_others = true; +$display_today = FreshRSS_Context::$sort === 'id'; +$display_yesterday = $display_today; +$display_others = $display_today; $useKeepUnreadImportant = !FreshRSS_Context::isImportant() && !FreshRSS_Context::isFeed(); $today = @strtotime('today'); @@ -46,15 +46,15 @@ $today = @strtotime('today'); $lastEntry = null; $nbEntries = 0; foreach ($this->entries as $item): - $lastEntry = $item; - $nbEntries++; - ob_flush(); - /** @var FreshRSS_Entry */ + /** @var FreshRSS_Entry|null $item */ $item = Minz_ExtensionManager::callHook('entry_before_display', $item); - if ($item == null) { + if ($item === null) { continue; } + ob_flush(); $this->entry = $item; + $lastEntry = $item; + $nbEntries++; // We most likely already have the feed object in cache, otherwise make a request $this->feed = FreshRSS_Category::findFeed($this->categories, $this->entry->feedId()) ?? @@ -62,7 +62,7 @@ $today = @strtotime('today'); if ($display_today && $this->entry->isDay(FreshRSS_Days::TODAY, $today)) { ?><div class="day" id="day_today"><?php - echo _t('gen.date.today'); + echo _t('index.feed.received.today'); ?><span class="date"> — <?= timestamptodate(time(), false) ?></span><?php ?><span class="name"><?= FreshRSS_Context::$name ?></span><?php ?></div><?php @@ -70,7 +70,7 @@ $today = @strtotime('today'); } if ($display_yesterday && $this->entry->isDay(FreshRSS_Days::YESTERDAY, $today)) { ?><div class="day" id="day_yesterday"><?php - echo _t('gen.date.yesterday'); + echo _t('index.feed.received.yesterday'); ?><span class="date"> — <?= timestamptodate(time() - 86400, false) ?></span><?php ?><span class="name"><?= FreshRSS_Context::$name ?></span><?php ?></div><?php @@ -78,7 +78,7 @@ $today = @strtotime('today'); } if ($display_others && $this->entry->isDay(FreshRSS_Days::BEFORE_YESTERDAY, $today)) { ?><div class="day" id="day_before_yesterday"><?php - echo _t('gen.date.before_yesterday'); + echo _t('index.feed.received.before_yesterday'); ?><span class="name"><?= FreshRSS_Context::$name ?></span><?php ?></div><?php $display_others = false; |
