From 56f66f4b6168276ca449d18a440b6958c6817088 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 15 Oct 2016 14:58:40 +0200 Subject: Remove superflous category request A category request was systematically done, although it is not always needed. --- app/Controllers/indexController.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/Controllers/indexController.php') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 4e2717920..5ca147ff3 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -159,6 +159,11 @@ class FreshRSS_index_Controller extends Minz_ActionController { * - hours (default: 0) */ private function updateContext() { + if (empty(FreshRSS_Context::$categories)) { + $catDAO = new FreshRSS_CategoryDAO(); + FreshRSS_Context::$categories = $catDAO->listCategories(); + } + // Update number of read / unread variables. $entryDAO = FreshRSS_Factory::createEntryDao(); FreshRSS_Context::$total_starred = $entryDAO->countUnreadReadFavorites(); -- cgit v1.2.3