From: Andrey Kutejko Date: Sun, 7 Dec 2014 02:18:16 +0000 (+0200) Subject: do not calculate component list for non-admin pages X-Git-Tag: 0.6~124 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=87a08475bb4e7a3f6191111b90b9b2fc2362a303;p=ipf.git do not calculate component list for non-admin pages --- 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 @@