Code

Fixed repository edit & deletion
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Feb 2006 12:54:55 +0000 (12:54 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Feb 2006 12:54:55 +0000 (12:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2731 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servRepository.inc
plugins/admin/systems/class_workstationStartup.inc

index 0d4453468a2a10005a8013036b32de4067e62b2d..617ba8f466eed56742b0d991fb9a155997c15d23 100644 (file)
@@ -119,7 +119,7 @@ class servrepository extends plugin
       if((preg_match("/^delete_/",$name))&&(!$once)){
 
         $value = preg_replace("/delete_/","",$name);
-        $value = preg_replace("/_.$/","",$value);
+        $value = base64_decode(preg_replace("/_.*$/","",$value));
 
         if(isset($this->repositories[$value])){
           $once = true;
@@ -129,7 +129,7 @@ class servrepository extends plugin
 
       if((preg_match("/^edit_/",$name))&&(!$once)){
         $value = preg_replace("/edit_/","",$name);
-        $value = preg_replace("/_.$/","",$value);
+        $value = base64_decode(preg_replace("/_.$/","",$value));
         if(isset($this->repositories[$value])){
           $once = true;
           $obj = $this->repositories[$value];
@@ -143,7 +143,7 @@ class servrepository extends plugin
     }
 
     if((isset($_GET['act']))&&($_GET['act']=="open")&&(isset($_GET['id']))){
-      $obj = $this->repositories[$_GET['id']];
+      $obj = $this->repositories[base64_decode($_GET['id'])];
       $obj['initialy_was'] = $obj['Release'];
       $this->dialog = new servRepositorySetup($this->config,$this->dn,$obj);
       $this->dialog->acl = $this->acl;
@@ -214,9 +214,9 @@ class servrepository extends plugin
       }    
   
       $divlist->AddEntry(array(
-                              array("string"=>preg_replace("/%s/",$name,$link),"attach"=>"style='width:80px;'"),
+                              array("string"=>preg_replace("/%s/",($name),$link),"attach"=>"style='width:80px;'"),
                               array("string"=>sprintf($link,$name,_("Sections")." :".$str)),
-                              array("string"=>preg_replace("/%s/",$name,$edit.$delete),"attach"=>"style='border-right:0px;width:55px;text-align:right;'")
+                              array("string"=>preg_replace("/%s/",base64_encode($name),$edit.$delete),"attach"=>"style='border-right:0px;width:55px;text-align:right;'")
                               ));
       }
     }
index 29246952eca5626ea393fbc1e207f553407ae543..6f9d7a22f621deefac14fc938e3538949f429389 100644 (file)
@@ -559,7 +559,7 @@ class workstartup extends plugin
     }elseif(isset($this->parent->by_object['workgeneric'])){
       $this->objectclasses = array("GOhard", "FAIobject");
     }else{
-      print "unknown";
+      print "Object Type Configuration : unknown";
       exit();
     }