Code

Added caching for static InstallRecipe information
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Jul 2011 08:31:58 +0000 (08:31 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Jul 2011 08:31:58 +0000 (08:31 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20948 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc

index dec41991c7a2eb801c218c9876a6c377d57c5a27..bed2dd23152b03bc2a375d76fdd96ca7dcd3cf6e 100644 (file)
@@ -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