Code

Fixed . - Prolbem with shares
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 Jul 2006 07:06:45 +0000 (07:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 Jul 2006 07:06:45 +0000 (07:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4114 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc

index 67c48760020980e83adfdcb112922a3992ea758b..b1c76c3a7d5d12c21f62c4fc71d66754155bb7d9 100644 (file)
@@ -561,14 +561,14 @@ class environment extends plugin
         $once = false;  
         $key  = preg_replace("/^gotoShareDel_/","",$name);
         $key  = preg_replace("/_+[xy]$/","",$key);
-        $key  = preg_replace("/_/", ".", $key);
+        $key  = base64_decode($key);
         if(isset($this->gotoShares[$key])) {
           unset($this->gotoShares[$key]);
         }
 
         /* Remove corresponding password entry, too. This is a workaround
            to get rid of old-style entries. */
-        $key= preg_replace("/\|/", "|!", $key);
+        $key= base64_decode($key);
         if(isset($this->gotoShares[$key])) {
           unset($this->gotoShares[$key]);
         }
@@ -578,7 +578,7 @@ class environment extends plugin
         $once = false;
         $key  = preg_replace("/^gotoShareResetPwd_/","",$name);
         $key  = preg_replace("/_+[xy]$/","",$key);
-        $key  = preg_replace("/_/", ".", $key);
+        $key  = base64_decode($key);
         $this->gotoShares[$key]['PwdHash'] = "";
       }
     }
@@ -598,7 +598,7 @@ class environment extends plugin
     
         /* Create pwd reset images */
         if($this->gotoShares[$key]['PwdHash'] != ""){
-          $img.= "<input type='image' name='gotoShareResetPwd_".$key." 'src='images/list_reset_password.png' alt='"._("Reset password hash")."' 
+          $img.= "<input type='image' name='gotoShareResetPwd_".base64_encode($key)." 'src='images/list_reset_password.png' alt='"._("Reset password hash")."' 
             title='"._("Reset password hash")."'>";
         }
         $field1 = array("string" => "<font style=\"color:#C0C0C0\">".$value."</font>" );
@@ -607,11 +607,11 @@ class environment extends plugin
 
         /* Create pwd reset img && delete image */
         if($this->gotoShares[$key]['PwdHash'] != ""){
-          $img.= "<input type='image' name='gotoShareResetPwd_".$key." 'src='images/list_reset_password.png' alt='"._("Reset password hash")."' 
+          $img.= "<input type='image' name='gotoShareResetPwd_".base64_encode($key)." 'src='images/list_reset_password.png' alt='"._("Reset password hash")."' 
             title='"._("Reset password hash")."'>";
           $img.= "&nbsp;";
         }
-        $img.= "<input type='image' name='gotoShareDel_".$key." 'src='images/edittrash.png' alt='"._("Delete")."' 
+        $img.= "<input type='image' name='gotoShareDel_".base64_encode($key)." 'src='images/edittrash.png' alt='"._("Delete")."' 
           title='"._("Delete share entry")."'>";
         $field1 = array("string" => $value);
         $field2 = array("string" => $img   , "attach" => "style='border-right:0px;'");