From a4e21aff1ab602472fb3ae7bac65c2573b43853f Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 2 May 2007 05:07:42 +0000 Subject: [PATCH] * Fixed undefined index for "All" * Unified translations git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6217 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/acl/class_aclRole.inc | 6 +++++- plugins/admin/applications/class_applicationManagement.inc | 6 +++++- plugins/admin/departments/class_departmentManagement.inc | 6 +++++- plugins/admin/fai/class_faiManagement.inc | 6 +++++- plugins/admin/groups/class_groupManagement.inc | 6 +++++- plugins/admin/mimetypes/class_mimetypeManagement.inc | 6 +++++- plugins/admin/ogroups/class_ogroupManagement.inc | 6 +++++- plugins/admin/systems/class_systemManagement.inc | 6 +++++- plugins/admin/users/class_userManagement.inc | 6 +++++- 9 files changed, 45 insertions(+), 9 deletions(-) diff --git a/plugins/admin/acl/class_aclRole.inc b/plugins/admin/acl/class_aclRole.inc index 7d257502e..cd2728f46 100644 --- a/plugins/admin/acl/class_aclRole.inc +++ b/plugins/admin/acl/class_aclRole.inc @@ -432,7 +432,11 @@ class aclrole extends acl foreach($list as $name => $translation){ $na = preg_replace("/^.*\//","",$name); - $prio= $plist[$na]['plPriority'] ; + if (!isset($plist[$na]['plPriority'])){ + $prio= 0; + } else { + $prio= $plist[$na]['plPriority'] ; + } $newSort[$name] = $prio; } diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index c07e40ccd..b54f52617 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -283,7 +283,11 @@ class applicationManagement extends plugin $dns_names .=""; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("intro", sprintf(_("You're about to delete the following application(s) %s"), @LDAP::fix($dns_names))); + if (count($this->dns) == 1){ + $smarty->assign("intro", sprintf(_("You're about to delete the following entry %s"), @LDAP::fix($dns_names))); + } else { + $smarty->assign("intro", sprintf(_("You're about to delete the following entries %s"), @LDAP::fix($dns_names))); + } $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index f4bb2fbac..3524b15f4 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -165,7 +165,11 @@ class departmentManagement extends plugin $dns_names .=""; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("info", sprintf(_("You're about to delete the following department(s) %s"), @LDAP::fix($dns_names))); + if (count($this->dns) == 1){ + $smarty->assign("info", sprintf(_("You're about to delete the following entry %s"), @LDAP::fix($dns_names))); + } else { + $smarty->assign("info", sprintf(_("You're about to delete the following entries %s"), @LDAP::fix($dns_names))); + } $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index a3b4d5f4e..71914a044 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -199,7 +199,11 @@ class faiManagement extends plugin $dns_names .=""; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("warning", sprintf(_("You're about to delete the following fai object(s) %s"), @LDAP::fix($dns_names))); + if (count($this->dns) == 1){ + $smarty->assign("warning", sprintf(_("You're about to delete the following entry %s"), @LDAP::fix($dns_names))); + } else { + $smarty->assign("warning", sprintf(_("You're about to delete the following entries %s"), @LDAP::fix($dns_names))); + } $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index a7376241d..e24f876e9 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -244,7 +244,11 @@ class groupManagement extends plugin $dns_names .=""; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("info", sprintf(_("You're about to delete the following group(s) %s"), @LDAP::fix($dns_names))); + if (count($this->dns) == 1){ + $smarty->assign("info", sprintf(_("You're about to delete the following entry %s"), @LDAP::fix($dns_names))); + } else { + $smarty->assign("info", sprintf(_("You're about to delete the following entries %s"), @LDAP::fix($dns_names))); + } $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/plugins/admin/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc index 44e0efb1e..f0c1b4ddb 100755 --- a/plugins/admin/mimetypes/class_mimetypeManagement.inc +++ b/plugins/admin/mimetypes/class_mimetypeManagement.inc @@ -277,7 +277,11 @@ class mimetypeManagement extends plugin $dns_names .=""; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("intro", sprintf(_("You're about to delete the following user(s) %s"), @LDAP::fix($dns_names))); + if (count($this->dns) == 1){ + $smarty->assign("intro", sprintf(_("You're about to delete the following entry %s"), @LDAP::fix($dns_names))); + } else { + $smarty->assign("intro", sprintf(_("You're about to delete the following entries %s"), @LDAP::fix($dns_names))); + } $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index 6cc45def4..2cb1f755a 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -151,7 +151,11 @@ class ogroupManagement extends plugin } $dns_names .=""; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("info", sprintf(_("You're about to delete the following object group(s) %s"), @LDAP::fix($dns_names))); + if (count($this->dns) == 1){ + $smarty->assign("info", sprintf(_("You're about to delete the following object entry %s"), @LDAP::fix($dns_names))); + } else { + $smarty->assign("info", sprintf(_("You're about to delete the following object entries %s"), @LDAP::fix($dns_names))); + } $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 39e09bdbf..d7b4ffa5d 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -453,7 +453,11 @@ class systems extends plugin $dns_names .=""; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("warning", sprintf(_("You're about to delete the following user(s) %s"), @LDAP::fix($dns_names))); + if (count($this->dns) == 1){ + $smarty->assign("warning", sprintf(_("You're about to delete the following entry %s"), @LDAP::fix($dns_names))); + } else { + $smarty->assign("warning", sprintf(_("You're about to delete the following entries %s"), @LDAP::fix($dns_names))); + } $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index f8b32dc3c..d11e22d65 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -313,7 +313,11 @@ class userManagement extends plugin $dns_names .=""; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("info", sprintf(_("You're about to delete the following user(s) %s"), @LDAP::fix($dns_names))); + if (count($this->dns) == 1){ + $smarty->assign("info", sprintf(_("You're about to delete the following entry: %s"), @LDAP::fix($dns_names))); + } else { + $smarty->assign("info", sprintf(_("You're about to delete the following entries: %s"), @LDAP::fix($dns_names))); + } $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } -- 2.30.2