Code

Updated generateLdif method
[gosa.git] / gosa-core / plugins / generic / references / class_reference.inc
index 3bb9c1ed7b5df57bfd3605cd4c3777e566bef33a..f79dec13c6a13b5fe0105253e4c5ff3effd35322 100644 (file)
@@ -84,7 +84,7 @@ class reference extends plugin
         // Check for user manager 
         $this->referenceFilters[] = array(
             'filter' => "(&(objectClass=gosaAccount)(manager=".normalizeLdap($this->dn)."))",
-            'attrs'  => array('givenName' => _("Given name"),'sn' => _("Surname"),'uid'=>_("Uid")),
+            'attrs'  => array('givenName' => _("Given name"),'sn' => _("Surname"),'uid'=>_("UID")),
             'msg'    => _("User manager"));
 
         // Go through filters and detect possible references  
@@ -132,10 +132,14 @@ class reference extends plugin
         // Mark plugin as viewed
         plugin::execute();
 
+        // Show ldif viewer
         if(isset($_POST['viewLdif'])){
-            echo "ding!";
+            $this->dialog = new ldifViewer($this->config, $this->dn);
+        }
+        if(isset($_POST['cancelLdifViewer'])) $this->dialog = NULL;
+        if($this->dialog instanceOf ldifViewer){
+            return($this->dialog->execute());
         }
-
 
         $smarty = get_smarty();        
 
@@ -150,11 +154,11 @@ class reference extends plugin
         
         // Convert the modifyTimestamp to a human readable value
         $tz = timezone::get_default_timezone();
-        $smarty->assign('modifyTimestamp', date('d.m.Y H:i:s', strtotime($this->modifyTimestamp)));
+        $smarty->assign('modifyTimestamp', set_post(date('d.m.Y H:i:s', strtotime($this->modifyTimestamp))));
 
         $smarty->assign('objectList', $this->objectList);
         $smarty->assign("acls",$this->aclResolver->getReadableACL());
-        $smarty->assign("usePrototype", "true");
+
         session::set('autocomplete', $this->aclResolver);
         return ($smarty->fetch (get_template_path('contents.tpl', TRUE, dirname(__FILE__))));
     }