Code

Fixed missing images problem in group headpage
[gosa.git] / plugins / admin / fai / class_faiManagement.inc
index b600298a12fdcb3c2d85d5f89640f9bed21d9c8e..1bb4fdc72085494d789db6f63ecf8b9558374ce8 100644 (file)
@@ -263,6 +263,7 @@ class faiManagement extends plugin
                        $this->dialog= new $a_setup[0]($this->config,
                                        $this->config->data['TABS'][$a_setup[2]],$this->dn);
                        $this->is_dialog = true;
+                       $_SESSION['objectinfo'] = $this->dn;
                }
 
 
@@ -319,7 +320,7 @@ class faiManagement extends plugin
                                $name = $this->dialog->save();
 
                                $this->dialog = new $a_setup[0]($this->config,
-                                               $this->config->data['TABS'][$a_setup[2]],$this->dn);
+                                               $this->config->data['TABS'][$a_setup[2]],$this->dn,$name);
                                $this->dialog->by_object[$a_setup[1]]->cn = $name;
                                $this->is_dialog = true;
                        }               
@@ -342,9 +343,9 @@ class faiManagement extends plugin
                        unset($this->dialog);
                        $this->dialog=NULL;
                        $this->is_dialog = false;
+                       unset($_SESSION['objectinfo']);
                }
 
-
                /* This check if the given tab could be saved 
                 * If it was possible to save it, remove dialog object. 
                 * If it wasn't possible, show errors and keep dialog.
@@ -360,10 +361,10 @@ class faiManagement extends plugin
                                unset($this->dialog);
                                $this->dialog=NULL;
                                $this->is_dialog=false;
+                               unset($_SESSION['objectinfo']);
                        }
                }
 
-
                /* If dialog is set, but $this->is_dialog==false, then 
                 *  only the "abort" button is shown, this are dialogs that must not be saved.  
                 * If is_dialog == true, we are currently editing tab objects.
@@ -524,7 +525,7 @@ class faiManagement extends plugin
                                                if(!$faifilter['ShowScripts']){ 
                                                        $abort = true;
                                                }
-                                       $img="<img src='images/fai_script' title='"._("Scripts")."' alt='S'>";
+                                       $img="<img src='images/fai_script.png' title='"._("Scripts")."' alt='S'>";
                                        $info = _("Scripts");
                                        break;
                                        case "FAIvariable"                      : 
@@ -686,6 +687,15 @@ class faiManagement extends plugin
                }
                ksort($this->objects);
                reset ($this->objects);
+       
+               /* use numeric index, thats a bit more secure */        
+               $tmp0 = array();
+               foreach($this->objects as $obj){
+                       $tmp0[]= $obj;
+               }
+               $this->objects = array();
+               $this->objects = $tmp0;
+
        }
 
        function remove_lock()