Code

Fixed o
[gosa.git] / plugins / personal / environment / class_environment.inc
index d5df39c6db904c4a478531ca98b005cd2ba0f506..c42b2ad25eafb075c7c754b6b20ab8f66cd4d0ef 100644 (file)
@@ -83,6 +83,8 @@ class environment extends plugin
       $suffix="User";
     }
 
+    $this->gotoKioskProfile= preg_replace("/^.*\//i","",$this->gotoKioskProfile);
+
     /* Get all Printer assignments */
     $ldap = $this->config->get_ldap_link();
     $ldap->cd($this->config->current['BASE']);
@@ -143,6 +145,11 @@ class environment extends plugin
         $tmp2['server']      =$tmp[0];
         $tmp2['name']        =$tmp[1];
         $tmp2['mountPoint']  =$tmp[2];
+        if(isset($tmp[3])){
+          $tmp2['OtherStuff']  =$tmp[3];
+        }else{
+          $tmp2['OtherStuff']  ="";
+        }
         $this->gotoShares[$tmp[1]."|".$tmp[0]]=$tmp2;
       }
     }
@@ -329,6 +336,7 @@ class environment extends plugin
       $smarty->assign("useProfileACL","");
     }else{
       $smarty->assign("gotoProfileFlag_CACL"," disabled ");
+      $smarty->assign("useProfileACL","disabled");
       $smarty->assign("gotoProfileServer"," disabled ");
     }
 
@@ -483,6 +491,7 @@ class environment extends plugin
         $s_mount = $_POST['gotoShareMountPoint'];
         /* Preparing the new assignment */ 
         $this->gotoShares[$a_share['name']]=$a_share;
+        $this->gotoShares[$a_share['name']]['OtherStuff']="";
         $this->gotoShares[$a_share['name']]['mountPoint']=$s_mount;
       }
     }  
@@ -920,16 +929,23 @@ class environment extends plugin
     /* Prepare Shares */
     $this->attrs['gotoShare']=array();
     foreach($this->gotoShares as $name => $share){
-      $this->attrs['gotoShare'][] =$share['server']."|".$share['name']."|".$share['mountPoint'];
+      $this->attrs['gotoShare'][] =$share['server']."|".$share['name']."|".$share['mountPoint']."|".$share['OtherStuff'];
     }
 
     if(!empty($this->gotoKioskProfile)){
-      $this->attrs['gotoKioskProfile']= $this->gotoKioskProfile;
+      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("gotoKioskProfile","gotoProfileQuota","gotoXResolution","gotoProfileServer");
+    $saveThis = array("gotoProfileQuota","gotoXResolution","gotoProfileServer");
   
     foreach($saveThis as $tosave){
       if(!empty($this->$tosave)){