Code

Updated generateLdif method
[gosa.git] / gosa-core / plugins / generic / references / class_ldifViewer.inc
1 <?php
3 class ldifViewer extends plugin
4 {
5     private $ldif;    
7     function __construct($config, $dn)
8     {
9         $this->initTime = microtime(TRUE);
10         stats::log('plugin', $class = get_class($this), $category = array($this->acl_category),  $action = 'open',
11                 $amount = 1, $duration = (microtime(TRUE) - $this->initTime));
13         $this->config = &$config;
14         $this->dn = $dn;
15         $ldap = $this->config->get_ldap_link();
16         $this->ldif=$ldap->generateLdif(LDAP::fix($this->dn),'(objectClass=*)','base');
17     }
19     function execute()
20     {
21         $smarty = get_smarty();
22         $smarty->assign('ldif', set_post($this->ldif));
23         return($smarty->fetch(get_template_path('ldifViewer.tpl')));
24     }
25 }
27 ?>