Code

Fixed attribute saving
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 10 Feb 2006 08:05:35 +0000 (08:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 10 Feb 2006 08:05:35 +0000 (08:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2654 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc

index 2a3613535a401372b3271ed8a2d54ca34f0eec54..059b35c20859f9bcb51100c4108e58d9e94e036d 100644 (file)
@@ -757,12 +757,27 @@ class environment extends plugin
   /* Save to LDAP */
   function save()
   {
+  
+    /* only save changed variables ....*/
+    if ($this->gotoKioskProfile =="none") $this->gotoKioskProfile ="";
+    if((!empty($this->gotoKioskProfile))&&($this->gotoKioskProfile != "none")){
+      if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){
+        $method="https://";
+      }else{
+        $method="http://";
+      }
+
+      $str = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/kiosk/");
+      $this->gotoKioskProfile= $str.$this->gotoKioskProfile;
+    }else{
+      $this->gotoKioskProfile= array();
+    }
+    
     plugin::save();
     $ldap= $this->config->get_ldap_link();
 
     $realyUsedAttrs= array();
 
-
     $path = search_config($this->config->data,"environment", "KIOSKPATH"); 
     /* Creating Kiosk Profiles */
     foreach($this->newKioskProfiles as $file){
@@ -958,18 +973,6 @@ class environment extends plugin
       $this->attrs['gotoShare'][] =$share['server']."|".$share['name']."|".$share['mountPoint']."|".$share['OtherStuff']."|".$share['Username'];
     }
 
-    if((!empty($this->gotoKioskProfile))&&($this->gotoKioskProfile != "none")){
-      if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){
-        $method="https://";
-      }else{
-        $method="http://";
-      }
-
-      $str = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/kiosk/");
-      $this->attrs['gotoKioskProfile']= $str.$this->gotoKioskProfile;
-    }else{
-      $this->attrs['gotoKioskProfile']= array();
-    }
 
     $saveThis = array("gotoProfileQuota","gotoXResolution","gotoProfileServer");