From: hickert Date: Thu, 2 Feb 2006 09:40:18 +0000 (+0000) Subject: Fixed Edit Problem with Hooks/Scripts X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3cad0d5e9ef5483b062c4daa5d094e5e08e83787;p=gosa.git Fixed Edit Problem with Hooks/Scripts git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2619 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiHookEntry.inc b/plugins/admin/fai/class_faiHookEntry.inc index 58f6ec4ba..a9b67e450 100644 --- a/plugins/admin/fai/class_faiHookEntry.inc +++ b/plugins/admin/fai/class_faiHookEntry.inc @@ -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; + } } } diff --git a/plugins/admin/fai/class_faiScriptEntry.inc b/plugins/admin/fai/class_faiScriptEntry.inc index 3d6ad9eb9..f028561f4 100644 --- a/plugins/admin/fai/class_faiScriptEntry.inc +++ b/plugins/admin/fai/class_faiScriptEntry.inc @@ -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; + } } }