From b142c7c6ab7c04dcba13a8921261f21af842b770 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 26 Jan 2006 13:17:19 +0000 Subject: [PATCH] Some W3c fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2586 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/main.php | 17 ++++++ include/class_debconfTemplate.inc | 2 +- include/class_mail-methods-kolab.inc | 54 ++++++++++++++++++- .../admin/systems/class_printerPPDDialog.inc | 2 +- plugins/admin/systems/servnfs.tpl | 4 +- plugins/gofax/faxaccount/lists.tpl | 2 +- .../personal/environment/hotplugDialogNew.tpl | 4 +- .../personal/environment/logonManagement.tpl | 4 +- .../personal/samba/samba3_workstations.tpl | 2 +- 9 files changed, 79 insertions(+), 12 deletions(-) diff --git a/html/main.php b/html/main.php index dc33b4831..9674a7c39 100644 --- a/html/main.php +++ b/html/main.php @@ -19,6 +19,7 @@ */ /* Basic setup, remove eventually registered sessions */ +$start = microtime(); $timing= array(); require_once ("../include/php_setup.inc"); require_once ("functions.inc"); @@ -353,5 +354,21 @@ echo $display; /* Save plist */ $_SESSION['plist']= $plist; +/* Echo compilation time */ +$r = split(" ",$start); +$ms = $r[0]; +$s= $r[1]; + +$re = split(" ",microtime()); +$mse = $re[0]; +$se= $re[1]; + +$add = 0; +if(($mse -$ms)<0){ + $se --; + $add = 1; +} +echo ($se -$s).","; +echo (int)(($add+($mse -$ms))*1000)." s"; // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> diff --git a/include/class_debconfTemplate.inc b/include/class_debconfTemplate.inc index 76ee78176..d044c46f7 100644 --- a/include/class_debconfTemplate.inc +++ b/include/class_debconfTemplate.inc @@ -223,7 +223,7 @@ class debconf function get_dialog() { if ($this->has_template){ - $result= ""; + $result= "
"; foreach ($this->template as $post_name => $entry){ diff --git a/include/class_mail-methods-kolab.inc b/include/class_mail-methods-kolab.inc index 9031196e9..ecc405d8d 100644 --- a/include/class_mail-methods-kolab.inc +++ b/include/class_mail-methods-kolab.inc @@ -83,6 +83,7 @@ class mailMethodKolab extends mailMethodCyrus function fixAttributesOnStore(&$mailObject) { + global $config; /* Convert attributes and objectClasses */ foreach ($this->attribute_map as $source => $dest){ if (isset($mailObject->attrs[$source])){ @@ -98,20 +99,70 @@ class mailMethodKolab extends mailMethodCyrus } $mailObject->attrs['objectClass']= $objectclasses; if (in_array("posixGroup", $mailObject->attrs['objectClass'])){ + + /* Add kolabSharedFoleder Class */ $mailObject->attrs['objectClass'][]= 'kolabSharedFolder'; /* Work on acl attribute */ $new_acl= array(); foreach ($mailObject->attrs['acl'] as $uacl){ + + /* Get user=(mail) & acls */ list($user, $acl) = split(" ", $uacl); + + /* Add al users which have seperated acls + %members% are all users in this group, + which have the standard group acl + */ if ($user != "%members%"){ $new_acl[$user]= $uacl; } else { + + /* All groupmembers will be added */ + $ldap = $config->get_ldap_link(); + $ldap->cd($config->current['BASE']); foreach ($mailObject->members as $member){ - $new_acl[$member]= "$member $acl"; + + /* Get user mail address .... */ + $ldap->search("(&(objectClass=person)(|(uid=".$member.")(mail=".$member.")))",array("mail")); + $res = $ldap->fetch(); + + /* Default mail address is set to uid - + So if there is no mail address defined the uid is added + */ + $mail = $member; + + /* Use mail address if it is available */ + if(isset($res['mail'][0])){ + $mail = $res['mail'][0]; + } + + /* only append this mail/permission string to acl, + if there arn't already some (special) configs for this user */ + $found =false; + foreach($mailObject->imapacl as $mailA => $acl){ + if(strtolower(trim($mailA))==strtolower(trim($mail))){ + $found = true; + } + } + + /* Skipp user, with no email adress too */ + if($member == $mail){ + $found = true; + } + + /* Append new user acl */ + if(!$found){ + $new_acl[$member]= "$mail $acl"; + } + + /* Old line */ + // $new_acl[$member]= "$member $acl"; } } } + + /* Assign new acls */ $mailObject->attrs['acl']= array(); foreach ($new_acl as $key => $value){ $mailObject->attrs['acl'][]= $value; @@ -126,7 +177,6 @@ class mailMethodKolab extends mailMethodCyrus $mailObject->attrs['kolabDeleteFlag']= array(); } - function fixAttributesOnRemove(&$mailObject) { /* Add attribute for object deletion and remove GOsa specific diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc index f9f3ed271..17420ed7d 100644 --- a/plugins/admin/systems/class_printerPPDDialog.inc +++ b/plugins/admin/systems/class_printerPPDDialog.inc @@ -306,7 +306,7 @@ class printerPPDDialog extends plugin } /* Create a table */ - $str .= "
"; + $str .= "
"; /* Input all data to the table */ foreach($this->ppdConfig as $cat => $obj){ diff --git a/plugins/admin/systems/servnfs.tpl b/plugins/admin/systems/servnfs.tpl index aabb8afe0..095e159d6 100644 --- a/plugins/admin/systems/servnfs.tpl +++ b/plugins/admin/systems/servnfs.tpl @@ -3,7 +3,7 @@
- +
{t}Name{/t} {$must} @@ -33,7 +33,7 @@ - +
{t}Type{/t} diff --git a/plugins/gofax/faxaccount/lists.tpl b/plugins/gofax/faxaccount/lists.tpl index 6359718a0..8794a9c76 100644 --- a/plugins/gofax/faxaccount/lists.tpl +++ b/plugins/gofax/faxaccount/lists.tpl @@ -15,7 +15,7 @@ {t}List of predefined blocklists{/t}
- +
{$divSelectPredefined} diff --git a/plugins/personal/environment/hotplugDialogNew.tpl b/plugins/personal/environment/hotplugDialogNew.tpl index 97a1a55a0..4c3f6fca1 100644 --- a/plugins/personal/environment/hotplugDialogNew.tpl +++ b/plugins/personal/environment/hotplugDialogNew.tpl @@ -2,7 +2,7 @@ - +
-
@@ -23,7 +23,7 @@
- +
diff --git a/plugins/personal/environment/logonManagement.tpl b/plugins/personal/environment/logonManagement.tpl index b7cd0beee..87e282ba3 100644 --- a/plugins/personal/environment/logonManagement.tpl +++ b/plugins/personal/environment/logonManagement.tpl @@ -49,7 +49,7 @@

 

- +

 {t}Script{/t}

@@ -68,7 +68,7 @@
+

 

diff --git a/plugins/personal/samba/samba3_workstations.tpl b/plugins/personal/samba/samba3_workstations.tpl index d71e2fa8f..f2ecfcc0b 100644 --- a/plugins/personal/samba/samba3_workstations.tpl +++ b/plugins/personal/samba/samba3_workstations.tpl @@ -27,7 +27,7 @@

- +
 
 
{$apply} -- 2.30.2