Code

Updated sudo options to support new kind of image buttons
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Mar 2010 08:09:03 +0000 (08:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Mar 2010 08:09:03 +0000 (08:09 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16711 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/sudo/admin/sudo/class_sudoOption.inc

index cf8d6bd1f98a9d5f3b0512cbb696b0030b2a2dc6..c167b206d02ac8346e1a9c6b168b6aaf64dc3c0b 100644 (file)
@@ -212,10 +212,8 @@ class sudoOption extends plugin
 
         if(preg_match("/^negOption_/",$name)){
 
-          $opt = preg_replace("/^negOption_/","",$name);
-          $opt = preg_replace("/_[^_]*$/","",$opt);
-          $id  = preg_replace("/^.*_([0-9])*$/","\\1",$opt);
-          $opt = preg_replace("/_[0-9]*$/","",$opt);
+          $opt = preg_replace("/^negOption_(.*)_[0-9]*$/","\\1", $name);
+          $id  = preg_replace("/^negOption_.*_([0-9])*$/","\\1", $name);
 
           if(isset($this->sudoOption[$opt][$id])){
             $val = $this->sudoOption[$opt][$id]["VALUE"];