Code

Upps
[gosa.git] / plugins / admin / fai / class_faiTemplateEntry.inc
index 9fec3e07b879fcd8ca7109f37a681acba53b1daa..57eee41245f8440b826e34ff19138ea7672279f2 100644 (file)
@@ -32,7 +32,7 @@ class faiTemplateEntry extends plugin
   {
     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){
@@ -46,7 +46,7 @@ class faiTemplateEntry extends plugin
 
     }else{
       $this->status = "new";
-      $this->orig_cn       = false;
+      $this->orig_cn= false;
     }
 
     $this->user = explode( '.', $this->FAIowner );
@@ -62,8 +62,8 @@ class faiTemplateEntry extends plugin
 
   function execute()
   {
-       /* Call parent execute */
-       plugin::execute();
+    /* Call parent execute */
+    plugin::execute();
 
     /* Fill templating stuff */
     $smarty     = get_smarty();