From ff362312133569454e02822352258303c8377575 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 12 Mar 2008 14:35:18 +0000 Subject: [PATCH] msgPool git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9716 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/admin/acl/class_aclManagement.inc | 4 ++-- .../class_departmentManagement.inc | 11 +++-------- .../admin/groups/class_groupManagement.inc | 13 ++++--------- .../admin/ogroups/class_ogroupManagement.inc | 14 +++++--------- .../admin/users/class_userManagement.inc | 19 ++++--------------- .../addons/addressbook/class_addressbook.inc | 2 +- .../systems/services/dhcp/class_servDHCP.inc | 2 +- .../fai/admin/fai/class_faiManagement.inc | 15 +++++---------- .../glpi/class_glpiAttachmentPool.inc | 2 +- .../glpi/class_glpiDeviceManagement.inc | 4 ++-- .../glpi/class_glpiPrinterCartridges.inc | 2 +- .../blocklists/class_blocklistManagement.inc | 9 ++++----- .../class_phoneConferenceManagment.inc | 9 ++++----- .../macro/class_gofonMacroManagement.inc | 9 ++++----- .../goto/addons/goto/class_gotomasses.inc | 2 +- .../class_applicationManagement.inc | 19 +++++++------------ .../class_applicationParameters.inc | 6 ++---- .../admin/devices/class_deviceManagement.inc | 13 ++++--------- .../mimetypes/class_mimetypeManagement.inc | 13 ++++--------- .../mail/sieve/class_sieveManagement.inc | 4 +--- .../admin/systems/class_systemManagement.inc | 13 ++++--------- 21 files changed, 64 insertions(+), 121 deletions(-) diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index 91cfe3f94..88e0f3607 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -242,7 +242,7 @@ class aclManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); - $smarty->assign("info", sprintf(_("You're about to delete the acl %s."), @LDAP::fix($this->dn))); + $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn))); $smarty->assign("is_role",true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); @@ -306,7 +306,7 @@ class aclManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); - $smarty->assign("info", sprintf(_("You're about to delete the acl %s."), @LDAP::fix($this->dn))); + $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("acl"))); $smarty->assign("is_role",false); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } else { diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index deb6fd1cc..81aaae199 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -161,19 +161,14 @@ class departmentManagement extends plugin $this->dns[$id] = $dn; } - $dns_names = "
";
+        $dns_names = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[] = @LDAP::fix($dn);
         }
-        $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - 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("info", msgPool::deleteInfo($dns_names)); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index 9975f313e..2e928eb71 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -340,19 +340,14 @@ class groupManagement extends plugin $this->dns[$id] = $dn; } - $dns_names = "
";
+        $dns_names = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[] =@LDAP::fix($dn);
         }
-        $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - 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("info", msgPool::deleteInfo($dns_names,_("group"))); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -431,7 +426,7 @@ class groupManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); - $smarty->assign("info", sprintf(_("You're about to delete the group '%s'."), @LDAP::fix($this->dn))); + $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("group"))); $smarty->assign("multiple", false); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc index 05df513ff..b1d139436 100644 --- a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc @@ -225,18 +225,14 @@ class ogroupManagement extends plugin } $this->dns[$id] = $dn; } - $dns_names = "
";
+        $dns_names = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[] = @LDAP::fix($dn);
         }
-        $dns_names .="
"; + /* Lock the current entry, so nobody will edit it during deletion */ - 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("info", msgPool::deleteInfo($dns_names,_("object group"))); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -310,7 +306,7 @@ class ogroupManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); - $smarty->assign("info", sprintf(_("You're about to delete the object group '%s'."), @LDAP::fix($this->dn))); + $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("object group"))); $smarty->assign("multiple", false); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } else { diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index adcbe468d..53d0ad834 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -445,18 +445,13 @@ class userManagement extends plugin $this->dns[$id] = $dn; } - $dns_names = "
";
+        $dns_names = array();
         foreach($this->dns as $dn){
-          $dns_names .= $dn."\n";
+          $dns_names[] = @LDAP::fix($dn);
         }
-        $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - if (count($this->dns) == 1){ - $info = sprintf(_("You're about to delete the following entry: %s"), @LDAP::fix($dns_names)); - } else { - $info = sprintf(_("You're about to delete the following entries: %s"), @LDAP::fix($dns_names)); - } + $info = sprintf(msgPool::deleteInfo($dns_names,_("user"))); $this->msg_dialog = new msg_dialog(_("Delete users"),$info,CONFIRM_DIALOG); $this->current_action = $s_action; } @@ -567,13 +562,7 @@ class userManagement extends plugin return(gen_locked_message ($user, $this->dn)); } - - /* Lock the current entry, so nobody will edit it during deletion */ -# add_lock ($this->dn, $this->ui->dn); -# $smarty->assign("info", sprintf(_("You're about to delete the user %s."), @LDAP::fix($this->dn))); -# $smarty->assign("multiple", false); -# return($smarty->fetch(get_template_path('remove.tpl', TRUE))); - $this->msg_dialog = new msg_dialog( _("Delete user"),sprintf(_("You're about to delete the user %s."), @LDAP::fix($this->dn)),CONFIRM_DIALOG); + $this->msg_dialog = new msg_dialog( _("Delete user"),msgPool::deleteInfo(@LDAP::fix($this->dn),_("user")),CONFIRM_DIALOG); $this->current_action = $s_action; } diff --git a/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc b/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc index e22da6c47..be2e7125b 100644 --- a/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc +++ b/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc @@ -313,7 +313,7 @@ class addressbook extends plugin /* Lock the current entry, so nobody will edit it during deletion */ $ui= get_userinfo(); add_lock ($this->dn, $ui->dn); - $smarty->assign("info", sprintf(_("You're about to delete the entry %s."), $this->dn)); + $smarty->assign("info", msgPool::deleteInfo($this->dn)); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } else { diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc index 014ffdeb0..b59584a40 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc @@ -252,7 +252,7 @@ class servdhcp extends goService if (isset($this->dhcpObjectCache[$dn])){ $this->current_object= $dn; $this->dialog= 1; - $smarty->assign("warning", sprintf(_("You're about to delete the DHCP section '%s'."), $dn)); + $smarty->assign("warning", msgPool::deleteInfo(@LDAP::fix($dn),_("DHCP section"))); return($smarty->fetch(get_template_path('remove_dhcp.tpl', TRUE, dirname(__FILE__)))); } } diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 32a764b0e..89bb6559d 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -204,7 +204,7 @@ class faiManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); - $smarty->assign("warning", sprintf(_("You're about to delete all information about the FAI class at '%s'."), @LDAP::fix($this->dn))); + $smarty->assign("warning",msgPool::deleteInfo(@LDAP::fix($this->dn),_("FAI object"))); $smarty->assign("multiple", false); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } else { @@ -246,19 +246,14 @@ class faiManagement extends plugin if(count($this->dns)){ - $dns_names = "
";
+          $dns_names = array();
           foreach($this->dns as $dn){
             add_lock ($dn, $this->ui->dn);
-            $dns_names .= $dn."\n";
+            $dns_names[] = @LDAP::fix($dn);
           }
-          $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - 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("warning",msgPool::deleteInfo($dns_names,_("FAI object"))); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -432,7 +427,7 @@ class faiManagement extends plugin we're allowed to remove this 'dn' */ if($this->acl_is_removeable()){ - $smarty->assign("info", sprintf(_("You're about to delete a fai branch / freeze '%s'."), $this->DivListFai->selectedBranch)); + $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->DivListFai->selectedBranch),_("FAI branch/freeze"))); return($smarty->fetch(get_template_path('remove_branch.tpl',TRUE))); } else { msg_dialog::display(_("Permission error"), _("You have no permission to delete this release!"), ERROR_DIALOG); diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAttachmentPool.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAttachmentPool.inc index f8568a823..eca6b9d01 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAttachmentPool.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAttachmentPool.inc @@ -65,7 +65,7 @@ class glpiAttachmentPool extends plugin /* remove attach from db */ $this->delAttach = $str; - $smarty->assign("warning", sprintf(_("You're about to delete the glpi attachment component '%s'."), $attach[$str]['name'])); + $smarty->assign("warning",msgPool::deleteInfo($attach[$str]['name'],_("attachment"))); return($smarty->fetch(get_template_path('remove_glpi.tpl',TRUE,dirname(__FILE__)))); } diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiDeviceManagement.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiDeviceManagement.inc index c507cbe3a..f07216390 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiDeviceManagement.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiDeviceManagement.inc @@ -105,9 +105,9 @@ class glpiDeviceManagement extends plugin $this->delete = $tmp; if(isset($tmp['name'])){ - $smarty->assign("warning", sprintf(_("You're about to delete the glpi device '%s'."), $tmp['name'])); + $smarty->assign("warning",msgPool::deleteInfo($tmp['name'],_("glpi device"))); }elseif(isset($tmp['designation'])){ - $smarty->assign("warning", sprintf(_("You're about to delete the glpi device '%s'."), $tmp['designation'])); + $smarty->assign("warning",msgPool::deleteInfo($tmp['designation'],_("glpi device"))); }else{ print_red(_("Can't detect object name.")); } diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridges.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridges.inc index 68c84d8fb..0e6e1eb74 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridges.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridges.inc @@ -89,7 +89,7 @@ class glpiPrinterCartridges extends plugin /* remove attach from db */ $this->del = $_GET['id']; $val = ($this->parent->handle->getCartridgeTypeInformations($_GET['id'])); - $smarty->assign("warning", sprintf(_("You're about to delete the glpi cartridge type '%s'."), $val[$this->del]['name'])); + $smarty->assign("warning", msgPool::deleteInfo($val[$this->del]['name'],_("cartridge"))); return($smarty->fetch(get_template_path('remove_glpi.tpl',TRUE,dirname(__FILE__)))); } diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc index 9ab22a4c6..d75b2993d 100644 --- a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc +++ b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc @@ -214,15 +214,14 @@ class blocklist extends plugin $this->dns[$id] = $dn; } - $dns_names = "
";
+        $dns_names[] = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[]=@LDAP::fix( $dn);
         }
-        $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("info", sprintf(_("You're about to delete the following blocklists(s) %s"), @LDAP::fix($dns_names))); + $smarty->assign("info", msgPool::deleteInfo($dns_names,_("blocklist"))); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -283,7 +282,7 @@ class blocklist extends plugin // Lock this dn for editing add_lock ($this->dn, $this->ui->dn); - $smarty->assign("info", sprintf(_("You're about to delete the blocklist '%s'."), $this->dn)); + $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("blocklist"))); $smarty->assign("multiple", false); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc index 43a277f70..abf3a2b4b 100644 --- a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc +++ b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceManagment.inc @@ -179,15 +179,14 @@ class phoneConferenceManagment extends plugin $this->dns[$id] = $dn; } - $dns_names = "
";
+        $dns_names = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[] = @LDAP::fix($dn);
         }
-        $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))); + $smarty->assign("info", msgPool::deleteInfo($dns_names,_("conference"))); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -249,7 +248,7 @@ class phoneConferenceManagment extends plugin return(gen_locked_message($conf, $this->dn)); } else { add_lock ($this->dn, $this->ui->dn); - $smarty->assign("info", sprintf(_("You're about to delete the whole LDAP subtree placed under '%s'."), $this->dn)); + $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("conference"))); $smarty->assign("multiple", false); $display.= $smarty->fetch (get_template_path('remove.tpl', TRUE)); return ($display); diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc index ebeb18131..5a4ff0ea9 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacroManagement.inc @@ -252,15 +252,14 @@ class goFonMacro extends plugin $this->dns[$id] = $dn; } - $dns_names = "
";
+        $dns_names = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[] = @LDAP::fix($dn);
         }
-        $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - $smarty->assign("intro", sprintf(_("You're about to delete the following macro(s) %s"), @LDAP::fix($dns_names))); + $smarty->assign("intro", msgPool::deleteInfo($dns_names,("macro"))); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -334,7 +333,7 @@ class goFonMacro extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); $smarty= get_smarty(); - $smarty->assign("intro", sprintf(_("You're about to delete the macro '%s'."), $this->dn)); + $smarty->assign("intro", msgPool::deleteInfo(@LDAP::fix($this->dn),_("macro"))); $smarty->assign("multiple", false); return($smarty->fetch (get_template_path('remove.tpl', TRUE))); } else { diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc index f2a7b34bb..9cb39a956 100644 --- a/gosa-plugins/goto/addons/goto/class_gotomasses.inc +++ b/gosa-plugins/goto/addons/goto/class_gotomasses.inc @@ -211,7 +211,7 @@ class gotomasses extends plugin } } $smarty->assign("multiple", TRUE); - $smarty->assign("info",sprintf(_("You are about to remove the following actions from the GOsa support Daemon: %s"),"
".$tmp."
")); + $smarty->assign("info",msgPool::deleteInfo("
".$tmp."
")); $this->current = $s_entry; return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc index 2450de95c..9cecb1103 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc @@ -290,25 +290,20 @@ class applicationManagement extends plugin foreach($ids as $id){ $dn = $this->applications[$id]['dn']; - if (($user= get_lock($dn)) != ""){ - return(gen_locked_message ($user, $dn)); - } $this->dns[$id] = $dn; } + if ($user= get_multiple_locks($this->dns)){ + return(gen_locked_message($user,$this->dns)); + } - $dns_names = "
";
+        $dns_names[] = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[] =@LDAP::fix($dn);
         }
-        $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - 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("intro", msgPool::deleteInfo($dns_names,_("application"))); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -386,7 +381,7 @@ class applicationManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); $smarty= get_smarty(); - $smarty->assign("intro", sprintf(_("You're about to delete the application '%s'."), @LDAP::fix($this->dn))); + $smarty->assign("intro",msgPool::deleteInfo(@LDAP::fix($this->dn),_("application"))); $smarty->assign("multiple", false); return($smarty->fetch (get_template_path('remove.tpl', TRUE))); } else { diff --git a/gosa-plugins/goto/admin/applications/class_applicationParameters.inc b/gosa-plugins/goto/admin/applications/class_applicationParameters.inc index 30c8ee338..913107044 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationParameters.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationParameters.inc @@ -46,11 +46,9 @@ class applicationParameters extends plugin $display= ""; if ($this->parent !== NULL){ if ($this->is_account){ - $display= $this->show_disable_header(_("Remove options"), - msgPool::featuresEnabled(_("parameter")); + $display= $this->show_disable_header(_("Remove options"),msgPool::featuresEnabled(_("parameter"))); } else { - $display= $this->show_enable_header(_("Create options"), - msgPool::featuresDisabled(_("parameter")); + $display= $this->show_enable_header(_("Create options"), msgPool::featuresDisabled(_("parameter"))); $this->parent->by_object['application']->generateTemplate(); return ($display); } diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc index 55d405e5d..59ce69d89 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc @@ -230,19 +230,14 @@ class deviceManagement extends plugin $this->dns[$id] = $dn; } - $dns_names = "
";
+        $dns_names = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[] =@LDAP::fix($dn);
         }
-        $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - 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("intro", msgPool::deleteInfo($dns_names),_("device")); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -322,7 +317,7 @@ class deviceManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); $smarty= get_smarty(); - $smarty->assign("intro", sprintf(_("You're about to delete the device '%s'."), @LDAP::fix($this->dn))); + $smarty->assign("intro", msgPool::deleteInfo(@LDAP::fix($this->dn),_("device"))); $smarty->assign("multiple", false); return($smarty->fetch (get_template_path('remove.tpl', TRUE))); } else { diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc index ae2cff498..89bc5745e 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc @@ -293,19 +293,14 @@ class mimetypeManagement extends plugin $this->dns[$id] = $dn; } - $dns_names = "
";
+        $dns_names = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[] = @LDAP::fix($dn);
         }
-        $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - 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("info", msgPool::deleteInfo($dns_names,_("mimetype"))); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -387,7 +382,7 @@ class mimetypeManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); $smarty= get_smarty(); - $smarty->assign("intro", sprintf(_("You're about to delete the mime type '%s'."), @LDAP::fix($this->dn))); + $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("mimetype"))); $smarty->assign("multiple", false); return($smarty->fetch (get_template_path('remove.tpl', TRUE))); } else { diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieveManagement.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieveManagement.inc index 417853e4b..f4a3396e0 100644 --- a/gosa-plugins/mail/personal/mail/sieve/class_sieveManagement.inc +++ b/gosa-plugins/mail/personal/mail/sieve/class_sieveManagement.inc @@ -356,9 +356,7 @@ class sieveManagement extends plugin /* Display confirm dialog */ if($this->script_to_delete != -1){ $smarty = get_smarty(); - $smarty->assign("Warning", - sprintf(_("You are going to remove the sieve script '%s' from your mail server."), - $this->scripts[$this->script_to_delete]['NAME'])); + $smarty->assign("Warning",msgPool::deleteInfo($this->scripts[$this->script_to_delete]['NAME'])); return($smarty->fetch(get_template_path("templates/remove_script.tpl",TRUE,dirname(__FILE__)))); } diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index e05a52c3a..0258be6bd 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -575,19 +575,14 @@ class systems extends plugin return(gen_locked_message($user,$this->dns)); } - $dns_names = "
";
+        $dns_names = array();
         foreach($this->dns as $dn){
           add_lock ($dn, $this->ui->dn);
-          $dns_names .= $dn."\n";
+          $dns_names[] = @LDAP::fix($dn);
         }
-        $dns_names .="
"; /* Lock the current entry, so nobody will edit it during deletion */ - 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("info", msgPool::deleteInfo($dns_names)); $smarty->assign("multiple", true); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } @@ -725,7 +720,7 @@ class systems extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); - $smarty->assign("warning", sprintf(_("You're about to delete all information about the component at '%s'."), @LDAP::fix($this->dn))); + $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn))); $smarty->assign("multiple", false); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } else { -- 2.30.2