Move autoflush calls
This commit is contained in:
parent
898dd9bea2
commit
2aba596785
@ -50,6 +50,12 @@ Router\before(function ($action) {
|
|||||||
if (ENABLE_HSTS && Helper\is_secure_connection()) {
|
if (ENABLE_HSTS && Helper\is_secure_connection()) {
|
||||||
Response\hsts();
|
Response\hsts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SessionStorage::getInstance()->isLogged()) {
|
||||||
|
$user_id = SessionStorage::getInstance()->getUserId();
|
||||||
|
Model\Item\autoflush_read($user_id);
|
||||||
|
Model\Item\autoflush_unread($user_id);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Image proxy (avoid SSL mixed content warnings)
|
// Image proxy (avoid SSL mixed content warnings)
|
||||||
|
@ -13,11 +13,6 @@ use Miniflux\Model;
|
|||||||
|
|
||||||
// Display unread items
|
// Display unread items
|
||||||
Router\get_action('unread', function () {
|
Router\get_action('unread', function () {
|
||||||
$user_id = SessionStorage::getInstance()->getUserId();
|
|
||||||
|
|
||||||
Model\Item\autoflush_read($user_id);
|
|
||||||
Model\Item\autoflush_unread($user_id);
|
|
||||||
|
|
||||||
$params = items_list(Model\Item\STATUS_UNREAD);
|
$params = items_list(Model\Item\STATUS_UNREAD);
|
||||||
|
|
||||||
if ($params['nb_unread_items'] === 0) {
|
if ($params['nb_unread_items'] === 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user