From: cajus Date: Thu, 19 May 2005 14:20:26 +0000 (+0000) Subject: Fixed smaller "cosmetic" errors X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a2842de39347ee62055c6e9b184bd3aae71f7d8d;p=gosa.git Fixed smaller "cosmetic" errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@261 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/TODO b/TODO index 60a6e011c..00c3a6b53 100644 --- a/TODO +++ b/TODO @@ -5,6 +5,7 @@ Things to fix before 2.4: - mail groups - shared folders - server + + ACLs * Make it "barrierefrei" diff --git a/include/class_sambaMungedDial.inc b/include/class_sambaMungedDial.inc index 82b514be3..2c08b9b9a 100644 --- a/include/class_sambaMungedDial.inc +++ b/include/class_sambaMungedDial.inc @@ -262,11 +262,15 @@ class sambaMungedDial foreach ($this->timeParams as $value) { if (!isset($this->ctx[$value]) || (isset($this->ctx[$value]) && $this->ctx[$value] == 0)) { $result[$value."Mode"]= "disabled"; + } else { + $result[$value."Mode"]= ""; } } if (substr($this->ctx['CtxCfgFlags1'], 6, 1) == "1") { $result['CtxInitialProgramMode'] = "disabled"; + } else { + $result['CtxInitialProgramMode'] = ""; } } diff --git a/include/functions.inc b/include/functions.inc index 72bd6723f..58d618b8b 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1529,7 +1529,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline) $trace= debug_backtrace(); /* Create error header */ - $error_collector.= ""; + $error_collector.= "
"._("PHP error")." \"$errstr\"
"; /* Generate trace history */ for ($index= 1; $index"; $error_collector.= ""; $error_collector.= ""; diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc index a7a609a5a..705e25c00 100644 --- a/plugins/personal/connectivity/class_kolabAccount.inc +++ b/plugins/personal/connectivity/class_kolabAccount.inc @@ -157,6 +157,7 @@ class kolabAccount extends plugin /* Transfer delegation list */ $smarty->assign("kolabDelegate", $this->kolabDelegate); + $smarty->assign("kolabDelegateACL", chkacl($this->acl, $this->kolabDelegate)); /* Create InvitationPolicy table */ $invitation= ""; diff --git a/plugins/personal/connectivity/class_phpgwAccount.inc b/plugins/personal/connectivity/class_phpgwAccount.inc index 451dbfa5f..9be083a9f 100644 --- a/plugins/personal/connectivity/class_phpgwAccount.inc +++ b/plugins/personal/connectivity/class_phpgwAccount.inc @@ -40,6 +40,7 @@ class phpgwAccount extends plugin if ($this->is_account){ $smarty->assign("phpgwState", "checked"); } else { + $smarty->assign("phpgwState", ""); $smarty->assign("fstate", "disabled"); } @@ -47,6 +48,8 @@ class phpgwAccount extends plugin $smarty->assign("tabbed", 1); } + $smarty->assign('phpgwAccountACL', chkacl($this->acl, 'phpgwAccount')); + $display.= $smarty->fetch (get_template_path('phpgw.tpl', TRUE, dirname(__FILE__))); return ($display); } diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc index 440f25c75..9422d83e3 100644 --- a/plugins/personal/connectivity/class_proxyAccount.inc +++ b/plugins/personal/connectivity/class_proxyAccount.inc @@ -73,6 +73,8 @@ class proxyAccount extends plugin $smarty->assign("quota_u", preg_replace("/^[0-9]+/", "", $this->gosaProxyQuota)); if ($this->is_account){ $smarty->assign("proxyState", "checked"); + } else { + $smarty->assign("proxyState", ""); } /* Prepare correct state */ diff --git a/plugins/personal/connectivity/class_pureftpdAccount.inc b/plugins/personal/connectivity/class_pureftpdAccount.inc index afc31740e..e2457b665 100644 --- a/plugins/personal/connectivity/class_pureftpdAccount.inc +++ b/plugins/personal/connectivity/class_pureftpdAccount.inc @@ -48,6 +48,7 @@ class pureftpdAccount extends plugin if ($this->is_account){ $smarty->assign("pureftpdState", "checked"); } else { + $smarty->assign("pureftpdState", ""); $smarty->assign("fstate", "disabled"); } $smarty->assign("use_FTPStatus", ($this->FTPStatus == "disabled") ? "checked" : ""); @@ -55,6 +56,7 @@ class pureftpdAccount extends plugin if ($this->parent != NULL){ $smarty->assign("tabbed", 1); } + $smarty->assign("pureftpdACL", chkacl($this->acl, 'pureftpd')); $display.= $smarty->fetch (get_template_path('pureftpd.tpl', TRUE, dirname(__FILE__))); return ($display); diff --git a/plugins/personal/connectivity/class_webdavAccount.inc b/plugins/personal/connectivity/class_webdavAccount.inc index 1618c5c70..2353535f2 100644 --- a/plugins/personal/connectivity/class_webdavAccount.inc +++ b/plugins/personal/connectivity/class_webdavAccount.inc @@ -31,6 +31,7 @@ class webdavAccount extends plugin if ($this->is_account){ $smarty->assign("webdavState", "checked"); } else { + $smarty->assign("webdavState", ""); $smarty->assign("wstate", "disabled"); } @@ -38,6 +39,8 @@ class webdavAccount extends plugin $smarty->assign("tabbed", 1); } + $smarty->assign('gosaWebdavACL', chkacl($this->acl, 'gosaWebdav')); + $display.= $smarty->fetch (get_template_path('webdav.tpl', TRUE, dirname(__FILE__))); return ($display); } diff --git a/plugins/personal/connectivity/oxchange.tpl b/plugins/personal/connectivity/oxchange.tpl index 72908dd70..8c8ff33c0 100644 --- a/plugins/personal/connectivity/oxchange.tpl +++ b/plugins/personal/connectivity/oxchange.tpl @@ -1,7 +1,5 @@ { if !$pg } -

{t}Open-Xchange Account{/t} -
-{t}Disabled by lack of Postgresql Support{/t}

+

{t}Open-Xchange Account{/t} - {t}disabled, no Postgresql support detected{/t}

{else}

{if $tabbed eq 1}{/if}{t}Open-Xchange account{/t}

"._("PHP error")."

\"$errstr\"
"._("File").": $file ("._('Line')." $line)"._("Type").": $type
"._("Arguments").": $args
diff --git a/plugins/personal/connectivity/phpgw.tpl b/plugins/personal/connectivity/phpgw.tpl index b6a949e27..a4913d125 100644 --- a/plugins/personal/connectivity/phpgw.tpl +++ b/plugins/personal/connectivity/phpgw.tpl @@ -1 +1 @@ -

{if $tabbed eq 1}{/if}{t}PHPGroupware account{/t}

+

{if $tabbed eq 1}{/if}{t}PHPGroupware account{/t}

diff --git a/plugins/personal/connectivity/proxy.tpl b/plugins/personal/connectivity/proxy.tpl index d9f4657e1..3af7a1417 100644 --- a/plugins/personal/connectivity/proxy.tpl +++ b/plugins/personal/connectivity/proxy.tpl @@ -1,4 +1,4 @@ -

{if $tabbed eq 1}{/if}{t}Proxy account{/t}

+

{if $tabbed eq 1}{/if}{t}Proxy account{/t}

diff --git a/plugins/personal/connectivity/pureftpd.tpl b/plugins/personal/connectivity/pureftpd.tpl index 0506d2be7..d7dd87584 100644 --- a/plugins/personal/connectivity/pureftpd.tpl +++ b/plugins/personal/connectivity/pureftpd.tpl @@ -1,4 +1,4 @@ -

{if $tabbed eq 1}{/if}{t}FTP account{/t}

+

{if $tabbed eq 1}{/if}{t}FTP account{/t}

diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 3368cc418..d4babd963 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -78,6 +78,7 @@ class user extends plugin /* variables to trigger password changes */ var $pw_storage= "crypt"; var $last_pw_storage= "unset"; + var $had_userCertificate= FALSE; /* attribute list for save action */ var $attributes= array("sn", "givenName", "uid", "personalTitle", "academicTitle", @@ -158,8 +159,11 @@ class user extends plugin } /* Load extra attributes: certificate and picture */ - $this->load_cert(); $this->load_picture(); + $this->load_cert(); + if ($this->userCertificate != ""){ + $this->had_userCertificate= TRUE; + } } /* Reset password storage indicator, used by password_change_needed() */ @@ -451,6 +455,8 @@ class user extends plugin } else { $smarty->assign("has_phoneaccount", "false"); } + } else { + $smarty->assign("has_phoneaccount", "false"); } return($smarty->fetch (get_template_path('generic.tpl', TRUE, dirname(__FILE__)))); @@ -728,7 +734,7 @@ class user extends plugin /* Remove cert? For some reason, the 'ldap' class doesn't want to remove binary entries, so I need to work around myself. */ - if ($remove_userCertificate == true && !$this->new){ + if ($remove_userCertificate == true && !$this->new && $this->had_userCertificate){ /* Reset array, assemble new, this should be reworked */ $this->attrs= array(); @@ -752,9 +758,8 @@ class user extends plugin } /* Modify using attrs */ - @ldap_mod_del($ds,$this->dn,$this->attrs); + ldap_mod_del($ds,$this->dn,$this->attrs); ldap_close($ds); - } /* Kerberos server defined? */ diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index 365252c3d..19517a7be 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -448,30 +448,45 @@ class mailAccount extends plugin /* Fill checkboxes */ if (!preg_match("/L/", $this->gosaMailDeliveryMode)) { $smarty->assign("drop_own_mails", "checked"); + } else { + $smarty->assign("drop_own_mails", ""); } if (preg_match("/V/", $this->gosaMailDeliveryMode)) { $smarty->assign("use_vacation", "checked"); + } else { + $smarty->assign("use_vacation", ""); } if (preg_match("/S/", $this->gosaMailDeliveryMode)) { $smarty->assign("use_spam_filter", "checked"); + } else { + $smarty->assign("use_spam_filter", ""); } if (preg_match("/R/", $this->gosaMailDeliveryMode)) { $smarty->assign("use_mailsize_limit", "checked"); + } else { + $smarty->assign("use_mailsize_limit", ""); } if (preg_match("/I/", $this->gosaMailDeliveryMode)) { $smarty->assign("only_local", "checked"); + } else { + $smarty->assign("only_local", ""); } if (preg_match("/C/", $this->gosaMailDeliveryMode)) { $smarty->assign("own_script", "checked"); + } else { + $smarty->assign("own_script", ""); } /* Have vacation templates? */ + $smarty->assign("template", ""); if (count($this->vacation)){ $smarty->assign("show_templates", "true"); $smarty->assign("vacationtemplates", $this->vacation); if (isset($_POST['vacation_template'])){ $smarty->assign("template", $_POST['vacation_template']); } + } else { + $smarty->assign("show_templates", "false"); } /* Fill spam selector */ diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index 47b7b36ad..12a460d86 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -438,8 +438,10 @@ class posixAccount extends plugin "use_shadowWarning") as $val){ if ($this->$val == 1){ $smarty->assign("$val", "checked"); - $smarty->assign("$val"."ACL", chkacl($this->acl, $val)); + } else { + $smarty->assign("$val", ""); } + $smarty->assign("$val"."ACL", chkacl($this->acl, $val)); } } @@ -471,6 +473,8 @@ class posixAccount extends plugin $smarty->assign("groupMembership", $this->groupMembership); if (count($this->groupMembership) > 16){ $smarty->assign("groups", "too_many_for_nfs"); + } else { + $smarty->assign("groups", ""); } $smarty->assign("printerList", $this->printerList); $smarty->assign("languages", $this->config->data['MAIN']['LANGUAGES']); @@ -482,6 +486,7 @@ class posixAccount extends plugin if ($_SESSION["js"]){ $smarty->assign("forceMode", "disabled"); } + $smarty->assign("force_ids", ""); } $smarty->assign("force_idsACL", chkacl($this->acl, "force_ids")); @@ -491,7 +496,7 @@ class posixAccount extends plugin $smarty->assign("$val"."ACL", chkacl($this->acl,$val)); } $smarty->assign("groupMembershipACL", chkacl($this->acl, "groupMembership")); - $smarty->assign("must_change_password", chkacl($this->acl, "must_change_password")); + $smarty->assign("status", $this->status); /* Work on trust modes */ $smarty->assign("trustmodeACL", chkacl($this->acl, "trustmode")); diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index ce752adc5..7c39ce448 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -431,6 +431,8 @@ class sambaAccount extends plugin $smarty->assign("$attr", ""); } } + } else { + $smarty->assign("$attr", ""); } $smarty->assign("$attr"."ACL", chkacl($this->acl, $attr)); } @@ -501,28 +503,42 @@ class sambaAccount extends plugin if (is_integer(strpos($this->sambaAcctFlags, "D")) || is_integer(strpos($this->sambaAcctFlags, "L"))) { $smarty->assign("flagsD", "checked"); + } else { + $smarty->assign("flagsD", ""); } /* Check for no_password_required flag 'N' */ if (is_integer(strpos($this->sambaAcctFlags, "N"))) { $smarty->assign("flagsN", "checked"); + } else { + $smarty->assign("flagsN", ""); } /* 'normal' Checkboxes */ if ($this->pwdCanChange=="1"){ $smarty->assign("flagsP", "checked"); + } else { + $smarty->assign("flagsP", ""); } if ($this->password_expires=="1"){ $smarty->assign("flagsC", "checked"); + } else { + $smarty->assign("flagsC", ""); } if ($this->logon_time_set=="1"){ $smarty->assign("flagsT", "checked"); + } else { + $smarty->assign("flagsT", ""); } if ($this->logoff_time_set=="1"){ $smarty->assign("flagsO", "checked"); + } else { + $smarty->assign("flagsO", ""); } if ($this->kickoff_time_set=="1"){ $smarty->assign("flagsK", "checked"); + } else { + $smarty->assign("flagsK", ""); } $smarty->assign("allow_pwchangeACL", chkacl($this->acl, "allow_pwchange"));