From 87a08475bb4e7a3f6191111b90b9b2fc2362a303 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sun, 7 Dec 2014 04:18:16 +0200 Subject: [PATCH] do not calculate component list for non-admin pages --- ipf/admin/app.php | 8 ++++++-- ipf/admin/templates/admin/base.html | 2 +- ipf/admin/templates/admin/index.html | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ipf/admin/app.php b/ipf/admin/app.php index 551980d..56c9b44 100644 --- a/ipf/admin/app.php +++ b/ipf/admin/app.php @@ -22,7 +22,7 @@ class IPF_Admin_App extends IPF_Application ); } - public function templateContext($request) + public function appList($request) { $app_list = array(); foreach (IPF_Project::getInstance()->appList() as $app) { @@ -42,13 +42,17 @@ class IPF_Admin_App extends IPF_Application ); } } + return $app_list; + } + public function templateContext($request) + { return array( 'IPF_VER' => IPF::version(), 'ADMIN_MEDIA_URL' => IPF::get('static_url') . 'admin/', 'admin_title' => IPF::get('admin_title'), 'indexpage_url' => IPF::get('indexpage_url', '/'), - 'app_list' => $app_list, + 'app_list' => F::bind(array($this, 'appList'), $request), ); } diff --git a/ipf/admin/templates/admin/base.html b/ipf/admin/templates/admin/base.html index 17bc267..8edd033 100644 --- a/ipf/admin/templates/admin/base.html +++ b/ipf/admin/templates/admin/base.html @@ -37,7 +37,7 @@