Code

Stupid browsers. ARghh
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 12 Dec 2005 09:59:06 +0000 (09:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 12 Dec 2005 09:59:06 +0000 (09:59 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2291 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servRepository.inc

index 965746d21dc78b1fdab6a85dd7cd26640a7eb60e..52bf62b9af0a7a3401f439665cf34279600f8fd9 100644 (file)
@@ -73,6 +73,8 @@ class servrepository extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    print_a($_POST);
+
     /* Fill templating stuff */
     $smarty= get_smarty();
     $display= "";
@@ -109,7 +111,12 @@ class servrepository extends plugin
     
     $once = false;
     foreach($_POST as $name => $value){
+
       if((preg_match("/^delete_/",$name))&&(!$once)){
+
+        $value = preg_replace("/delete_/","",$name);
+        $value = preg_replace("/_.$/","",$value);
+
         if(isset($this->repositories[$value])){
           $once = true;
           unset($this->repositories[$value]);
@@ -117,6 +124,8 @@ class servrepository extends plugin
       }
 
       if((preg_match("/^edit_/",$name))&&(!$once)){
+        $value = preg_replace("/edit_/","",$name);
+        $value = preg_replace("/_.$/","",$value);
         if(isset($this->repositories[$value])){
           $once = true;
           $obj = $this->repositories[$value];