Code

Fixed labeledURI / Uri problem
[gosa.git] / plugins / admin / applications / class_applicationManagement.inc
index 8bdc6bbe93024e8b62b74c587e9aa66603bf1ac5..261b19617f614da68115c5b7f14f0cf29721c093 100644 (file)
@@ -247,7 +247,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'."), $this->dn));
+                       $smarty->assign("intro", sprintf(_("You're about to delete the application '%s'."), LDAP::fix($this->dn)));
                        return($smarty->fetch (get_template_path('remove.tpl', TRUE)));
                } else {
 
@@ -329,7 +329,7 @@ class applicationManagement extends plugin
           " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
           " <input class='center' type='image' align='middle' src='images/list_new_app.png' alt='"._("new")."' title='"._("Create new application")."' name='appl_new'>&nbsp;".
           " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
-          _("Current base")."&nbsp;<select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
+          _("Base")."&nbsp;<select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
           " <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'>&nbsp;".
           "</div>";
 
@@ -445,7 +445,13 @@ class applicationManagement extends plugin
          * We also need to search for the departments
          * So we are able to navigate like in konquerer
          */
-        $base2 = preg_replace("/ou=people,/i","",$base);
+        $peopleOU = get_people_ou();
+
+        if(empty($peopleOU)){
+          $base2 = $base;
+        }else{
+          $base2 = preg_replace("/".$peopleOU."/i","",$base);    
+        }
 
         $res3 =  get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
             TRUE, $base2, array("ou", "description"), TRUE);