diff --git a/gosa-core/plugins/generic/references/class_reference.inc b/gosa-core/plugins/generic/references/class_reference.inc
index 2cb779472af019f6fb1d91e6c43be97dc21a5ef0..11a5383b94cebb18883783eacadd22604ce50b4b 100644 (file)
class reference extends plugin
{
- var $attributes= array('uid');
+ var $attributes= array('uid','modifyTimestamp');
var $aclResolver = NULL;
var $referenceFilters = array();
var $objectList ="";
+ var $modifyTimestamp = "";
function reference (&$config, $dn= NULL, $parent = NULL)
{
// Init the plugin
plugin::plugin($config,$dn,$parent);
+ // Try to read the 'modifyTimestamp' - this has to be done separately.
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->cat($this->dn, array('modifyTimestamp'));
+ if($ldap->count()){
+ $attrs = $ldap->fetch();
+ if(isset($attrs['modifyTimestamp'][0])){
+ $this->modifyTimestamp = $attrs['modifyTimestamp'][0];
+ }
+ }
+
// Initialize the ACL-resolver
$this->aclResolver = new aclResolver($this->config, $this->dn, $this);
{
// Mark plugin as viewed
plugin::execute();
+
+ // Show ldif viewer
+ if(isset($_POST['viewLdif'])){
+ $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();
// Assign permissions
$smarty->assign('aclREAD', preg_match("/r/",$ui->get_category_permissions($this->dn, 'acl')));
$smarty->assign('completeACL', $ui->has_complete_category_acls($this->dn, $category));
$smarty->assign('someACL', $ui->get_category_permissions($this->dn, $category));
+
+ // Convert the modifyTimestamp to a human readable value
+ $tz = timezone::get_default_timezone();
+ $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__))));
}