Code

Fixed Edit Problem with Hooks/Scripts
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Feb 2006 09:40:18 +0000 (09:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Feb 2006 09:40:18 +0000 (09:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2619 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiHookEntry.inc
plugins/admin/fai/class_faiScriptEntry.inc

index 58f6ec4bacad53043b213a7b0a449e5f29f8c13e..a9b67e450c97a5e5a3e9be3c75275da8e03363da 100644 (file)
@@ -34,8 +34,18 @@ class faiHookEntry extends plugin
         $this->$oname=$value;
       }
     }else{
-      $this->status = "new";
-      $this->orig_cn       = false;
+      if(count($object)){
+        $this->orig_cn= $object['cn'];
+        $this->dn=$object['dn'];
+        foreach($object as $name=>$value){
+          $oname = $name;
+          $this->$oname=$value;
+        }
+      }else{
+
+        $this->status = "new";
+        $this->orig_cn       = false;
+      }
     }
   }
 
index 3d6ad9eb92e29304af1b11edffdebe10161bdd5d..f028561f4e91d46881535eabc03ee615d168a80c 100644 (file)
@@ -20,8 +20,9 @@ class faiScriptEntry extends plugin
   var $FAIscript     = "";
   var $description   = "";
   var $status        = "new";
+
   
-  function faiScriptEntry ($config, $dn= NULL,$object=false)
+  function faiHookEntry ($config, $dn= NULL,$object=false)
   {
     plugin::plugin ($config, $dn);
     if($dn != "new"){
@@ -32,8 +33,18 @@ class faiScriptEntry extends plugin
         $this->$oname=$value;
       }
     }else{
-      $this->status = "new";
-      $this->orig_cn       = false;
+      if(count($object)){
+        $this->orig_cn= $object['cn'];
+        $this->dn=$object['dn'];
+        foreach($object as $name=>$value){
+          $oname = $name;
+          $this->$oname=$value;
+        }
+      }else{
+
+        $this->status = "new";
+        $this->orig_cn       = false;
+      }
     }
   }