From: hickert Date: Tue, 26 Jul 2011 08:31:58 +0000 (+0000) Subject: Added caching for static InstallRecipe information X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=405ba1234e0fe74d68e5025c4e8a6d0f131b5899;p=gosa.git Added caching for static InstallRecipe information git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20948 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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