Code

Updated environment/kiosk error
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Apr 2008 07:25:44 +0000 (07:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Apr 2008 07:25:44 +0000 (07:25 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10630 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/personal/environment/class_environment.inc

index 91b98c142edbbf0d44cd92c1f3733c00d0e97571..f3a1d06eaa3855b8e40133fd0b00638bceba3a4e 100644 (file)
@@ -273,7 +273,7 @@ class environment extends plugin
     $this->gotoKioskProfile_Profile= preg_replace("/^.*\//","",$this->gotoKioskProfile);
 
     $error = false;
-    if(!in_array($this->gotoKioskProfile_Server, $this->gotoKioskProfiles['SERVERS'])){
+    if(!isset($this->gotoKioskProfiles['SERVERS'][$this->gotoKioskProfile_Server])){
       $error = true;
     }elseif(!in_array($this->gotoKioskProfile_Profile, $this->gotoKioskProfiles['BY_SERVER'][$this->gotoKioskProfile_Server])){
       $error = true;
@@ -282,6 +282,9 @@ class environment extends plugin
       msg_dialog::display(_("Warning"), sprintf(_("Kiosk profile '%s' located on server '%s' is not available anymore. Kiosk profile will be disabled!"), $this->gotoKioskProfile_Profile, $this->gotoKioskProfile_Server), WARNING_DIALOG);
       $this->gotoKioskProfile_Server ="none";
       $this->gotoKioskProfile_Profile="";
+    }elseif(empty($this->gotoKioskProfile)){
+      $this->gotoKioskProfile_Server ="none";
+      $this->gotoKioskProfile_Profile="";
     }
   }