Code

Fixed group kiosk profile detection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Apr 2008 07:09:11 +0000 (07:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Apr 2008 07:09:11 +0000 (07:09 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10598 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 0c2356ebaada70912f631ef33951eb4672c37bd0..91b98c142edbbf0d44cd92c1f3733c00d0e97571 100644 (file)
@@ -274,18 +274,14 @@ class environment extends plugin
 
     $error = false;
     if(!in_array($this->gotoKioskProfile_Server, $this->gotoKioskProfiles['SERVERS'])){
-      $this->gotoKioskProfile_Server = key($this->gotoKioskProfiles['SERVERS']);
       $error = true;
-    }
-  
-    if(!in_array($this->gotoKioskProfile_Profile, $this->gotoKioskProfiles['BY_SERVER'][$this->gotoKioskProfile_Server])){
-      $this->gotoKioskProfile_Profile = $this->gotoKioskProfiles['BY_SERVER'][$this->gotoKioskProfile_Server][0];
+    }elseif(!in_array($this->gotoKioskProfile_Profile, $this->gotoKioskProfiles['BY_SERVER'][$this->gotoKioskProfile_Server])){
       $error = true;
     }
     if($error && !empty($this->gotoKioskProfile)){
+      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="";
-      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);
     }
   }