From 3cad0d5e9ef5483b062c4daa5d094e5e08e83787 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 2 Feb 2006 09:40:18 +0000 Subject: [PATCH] Fixed Edit Problem with Hooks/Scripts git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2619 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiHookEntry.inc | 14 ++++++++++++-- plugins/admin/fai/class_faiScriptEntry.inc | 17 ++++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) 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; + } } } -- 2.30.2