From: hickert Date: Fri, 15 Oct 2010 14:07:32 +0000 (+0000) Subject: Added checks for selected install and config management method X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9ae09d1235768b749fb027277a033a38bb66c3e5;p=gosa.git Added checks for selected install and config management method git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20064 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 def5bb658..d82b6520f 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc @@ -129,6 +129,22 @@ class InstallRecipe extends plugin $this->installBootstrapMethod = key($this->installBootstrapMethodList); $this->installConfigManagement = key($this->installConfigManagementList[$this->installBootstrapMethod]); } + + // Check if we've a valid bootstrap and configMangement method selected + if(!isset($this->installConfigManagementList[$this->installBootstrapMethod])){ + $newMethod = key($this->installBootstrapMethodList); + msg_dialog::display(_("Error"), + sprintf(_("The selected bootstrap method '%s' is invalid! Using '%s' instead!"), + $this->installBootstrapMethod,$newMethod), ERROR_DIALOG); + $this->installBootstrapMethod = $newMethod; + } + if(!isset($this->installConfigManagementList[$this->installBootstrapMethod][$this->installConfigManagement])){ + $newMethod = key($this->installConfigManagementList[$this->installBootstrapMethod]); + msg_dialog::display(_("Error"), + sprintf(_("The selected config management method '%s' is invalid! Using '%s' instead!"), + $this->installConfigManagement,$newMethod), ERROR_DIALOG); + $this->installConfigManagement = $newMethod; + } }