Code

Added additional check to delete block
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Aug 2007 08:13:29 +0000 (08:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Aug 2007 08:13:29 +0000 (08:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7100 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/gotomasses/class_gotomasses.inc

index 8b32876efd6969dfddb06ef190e8289d8179bb5e..677b92cf58d63ebbc1bfd2073a6ae0a0acdec2bd 100644 (file)
@@ -67,9 +67,13 @@ class gotomasses extends plugin
       }else{
         $this->ids_to_remove = $this->list_get_selected_items();
         $tmp = "";
-        foreach($this->ids_to_remove as $id){
-          $task = $this->tasks[$id];
-          $tmp.= "\n".$this->target_to_string($task);
+        foreach($this->ids_to_remove as $key => $id){
+          if(isset($this->tasks[$id])){
+            $task = $this->tasks[$id];
+            $tmp.= "\n".$this->target_to_string($task);
+          }else{
+            unset($this->ids_to_remove[$key]);
+          }
         }
         $smarty->assign("multiple", TRUE); 
         $smarty->assign("info",sprintf(_("Your are about to delete the following tasks: %s"),"<pre>".$tmp."</pre>"));