Code

Removed duplicated save_object
[gosa.git] / plugins / admin / fai / class_faiVariableEntry.inc
index 12c66fe134ee651930a721d4217b784157387784..5a0e04f2ef08421922c5758b78baef2087fbfcf2 100644 (file)
@@ -24,7 +24,7 @@ class faiVariableEntry extends plugin
   function faiVariableEntry ($config, $dn= NULL,$object=false)
   {
     plugin::plugin ($config, $dn);
-    if($dn != "new"){
+    if((isset($object['cn'])) && (!empty($object['cn']))){
       $this->orig_cn= $object['cn'];
       $this->dn=$object['dn'];
       foreach($object as $name=>$value){
@@ -91,7 +91,8 @@ class faiVariableEntry extends plugin
   /* Check supplied data */
   function check()
   {
-    $message= array();
+    /* Call common method to give check the hook */
+    $message= plugin::check();
     
     if(empty($this->FAIvariableContent)) {
       $message[]=_("Please specify a value for the attribute 'content'.");