From 405ba1234e0fe74d68e5025c4e8a6d0f131b5899 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 26 Jul 2011 08:31:58 +0000 Subject: [PATCH] Added caching for static InstallRecipe information git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20948 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/Device/class_InstallRecipe.inc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc index dec41991c..bed2dd231 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc @@ -251,12 +251,18 @@ class InstallRecipe extends plugin "installationTemplates" => "loadInstallationTemplates", "installationMethods" => "loadInstallationMethods", "locales" => "getSystemLocales" ) as $target => $func){ - $$target = $this->$func(); - if($$target == NULL){ - $this->initFailed = TRUE; - msg_dialog::display(_("Error"), msgPool::rpcError($this->rpcErrorMessage), ERROR_DIALOG); - return; + + if(!session::is_set("InstallRecipe::{$func}")){ + $tmp = $this->$func(); + if($tmp == NULL){ + $this->initFailed = TRUE; + msg_dialog::display(_("Error"), msgPool::rpcError($this->rpcErrorMessage), ERROR_DIALOG); + return; + }else{ + session::set("InstallRecipe::{$func}", $tmp); + } } + $$target = session::get("InstallRecipe::{$func}"); } // Assign fetchted values -- 2.30.2