Code

Added delete Info
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 Mar 2008 14:41:18 +0000 (14:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 Mar 2008 14:41:18 +0000 (14:41 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9718 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_MultiSelectWindow.inc
gosa-core/include/utils/class_msgPool.inc

index fee26be039adeaa10cbc133a46a80d9559a62ef7..f258f944bdcf521df3137b704276979f42441cd0 100644 (file)
@@ -449,7 +449,7 @@ class MultiSelectWindow{
 
                /* Check for exeeded sizelimit */
                $smarty->assign("hint"                          , print_sizelimit_warning());
-               $smarty->assign("DivList"                       , $divlist->DrawList().$this->footer);
+               $smarty->assign("DivList"                       , $divlist->DrawList()."\n\n\n\n\n".$this->footer."\n\n\n\n\n");
 
                if($this->is_headpage){
                        $smarty->assign("tree_image",           get_template_path('images/tree.png'));
index c8831f325e1dcfe3c343b852c70d66adbff12a36..3c14c4eb20fb91293cafad351e3f997960dc7535 100644 (file)
@@ -8,6 +8,37 @@ define ("LDAP_AUTH",   6);
 
 class msgPool
 {
+  public static function deleteInfo($name= "",$type = "")
+  {
+    if ($name == "") { 
+               if($type == ""){
+                       return (_("You are going to delete this object!"));
+               }else{
+                       return (sprintf(_("You are going to delete this '%s' object!"),$type));
+               }
+    }
+       if (!is_array($name)){
+               if($type == ""){
+                       return (_("You are going to delete this object:")."<br><br><i>$name</i>");
+               }else{
+                       return (sprintf(_("You are going to delete the '%s' object:"),$type)."<br><br><i>$name</i>");
+               }
+    }
+    if (count($name) == 1){
+               if($type == ""){
+                       return (_("You are going to delete this object:")."<br>".msgPool::buildList($name));
+               }else{
+                       return (sprintf(_("You are going to delete the '%s' object:"),$type)."<br>".msgPool::buildList($name));
+               }
+    }
+       if($type == ""){
+               return (_("You are going to delete these objects:")."<br>".msgPool::buildList($name));
+       }else{
+               return (sprintf(_("You are going to delete these '%s' objects:"),$type)."<br>".msgPool::buildList($name));
+       }
+  }
+
+
   public static function permDelete($name= "")
   {
     if ($name == "") { 
@@ -284,7 +315,7 @@ class msgPool
   public static function buildList($data)
   {
     $objects= "";
-    foreach ($name as $key => $value){
+    foreach ($data as $key => $value){
       if (is_numeric($key)){
         $objects.= "<br>\n<i>$value</i>";
       } else {