Code

Added additional check for gotoKioskProfile ...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 6 Apr 2006 05:06:27 +0000 (05:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 6 Apr 2006 05:06:27 +0000 (05:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3001 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc

index 6e1121ae81dbe9b2d31b32487af7abc1f8f259d7..b3da9b374a94e00446347e67a65f0bdb41a25b6b 100644 (file)
@@ -50,7 +50,7 @@ class environment extends plugin
   /* Kiosk profile */
   var $gotoKioskProfile   = "none";     // The selected Kiosk Profile
   var $gotoKioskProfiles  = array();// All available Kiosk profiles
-  VAR $newKioskProfiles   = array();
+  var $newKioskProfiles   = array();
 
   /* Hotplug Devices */
   var $gotoHotplugDevice  = array();     // Selected hotplug
@@ -417,6 +417,11 @@ class environment extends plugin
 
     $list = array_reverse($list);
 
+    if(!isset($list[$this->gotoKioskProfile])){
+      print_red(sprintf(_("The selected kiosk profile '%s' is no longer available, setting current profile to 'none'."),$this->gotoKioskProfile));
+      $this->gotoKioskProfile = 'none';
+    }
+
     /* Reassign help class */
     $_SESSION['current_class_for_help'] = get_class($this);