Code

Updated enviroment.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Mar 2008 08:40:17 +0000 (08:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Mar 2008 08:40:17 +0000 (08:40 +0000)
-KioskProfiles were not saved correctly

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9890 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index b6ccc948efff0083a34865c1e23a60d3e1c5d8e5..b0b2a567eaf55831ada13bf72c1a9a2ee6127dc2 100644 (file)
@@ -251,8 +251,10 @@ class environment extends plugin
     $cnt = 0;
     while($attrs = $ldap->fetch()){
       for($i = 0 ; $i < $attrs['gotoKioskProfile']['count'] ; $i ++){
+        $name = preg_replace("/^.*\//","",$attrs['gotoKioskProfile'][$i]);
         $name = preg_replace("/^.*\//","",$attrs['gotoKioskProfile'][$i]);
         $tmp1[$attrs['cn'][0]][] = $name;
+        $tmp3[$attrs['cn'][0]][$name] = $attrs['gotoKioskProfile'][$i];
       }
       $tmp2[$attrs['cn'][0]]= $attrs['cn'][0];
       $cnt ++;
@@ -264,6 +266,7 @@ class environment extends plugin
 
     $this->gotoKioskProfiles['BY_SERVER'] = $tmp1;
     $this->gotoKioskProfiles['SERVERS']   = $tmp2;
+    $this->gotoKioskProfiles['MAP']       = $tmp3;
   
     $this->gotoKioskProfile_Server = preg_replace("/^.*:\/\/([^\/]*).*$/","\\1",$this->gotoKioskProfile);
     $this->gotoKioskProfile_Profile= preg_replace("/^.*\//","",$this->gotoKioskProfile);
@@ -1124,11 +1127,7 @@ class environment extends plugin
      */ 
     /* only save changed variables ....*/
     if ($this->gotoKioskProfile_Server != "none"){
-      if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){
-        $method="https://".$this->gotoKioskProfile_Server."/kiosk/".$this->gotoKioskProfile_Profile;
-      }else{
-        $method="http://".$this->gotoKioskProfile_Server."/kiosk/".$this->gotoKioskProfile_Profile;
-      }
+      $method = $this->gotoKioskProfiles['MAP'][$this->gotoKioskProfile_Server][$this->gotoKioskProfile_Profile];
       $this->gotoKioskProfile= $method;
     }else{
       $this->gotoKioskProfile= array();