diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc
index 3524b15f436149ef3227832f29e8d77312255f9a..e2db188d1d4ad28d260a66edc56c446634a3340e 100644 (file)
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-require "tabs_department.inc";
class departmentManagement extends plugin
{
var $ObjectTaggingRequested = false; // Object must be tagged, an iframe will be shown.
var $RecursiveRemoveRequested = false; // Is true, if this object must be moved, an iframe will be displayed in this case
- function departmentManagement ($config, $ui)
+ function departmentManagement (&$config, &$ui)
{
- $this->ui= $ui;
+ $this->ui= &$ui;
$this->dn= "";
- $this->config= $config;
+ $this->config= &$config;
$this->DivListDepartment = new divListDepartment($this->config,$this);
}
}
}
+ /* Create options */
+ if(isset($_POST['menu_action']) && $_POST['menu_action'] == "dep_new"){
+ $s_action = "new";
+ }
+
+ /* handle remove from layers menu */
+ if(isset($_POST['menu_action']) && preg_match("/^remove_multiple/",$_POST['menu_action'])){
+ $s_action = "del_multiple";
+ }
+
/***************
Create a new department
$this->deptabs->set_acl_base();
$this->deptabs->delete ();
$this->deptabs = NULL;
- gosa_log ("Department object'".$this->dn."' has been removed");
} else {
print_red (_("You have no permission to remove this department."));
}
} else {
add_lock ($this->dn, $this->ui->dn);
$smarty->assign("info", sprintf(_("You're about to delete the whole LDAP subtree placed under '%s'."), @LDAP::fix($this->dn)));
+ $smarty->assign("multiple", false);
$display.= $smarty->fetch (get_template_path('remove.tpl', TRUE));
return ($display);
}
$acl = $this->ui->get_permissions($this->dn,"department/department");
if(preg_match("/d/",$acl)){
$this->remove_from_parent();
- gosa_log ("Department object'".$this->dn."' has been removed");
} else {
print_red (_("You have no permission to remove this department."));
}
if (count($message) == 0){
$this->deptabs->save(true);
- $this->config->get_departments();
+ global $config;
+ $config->get_departments();
+ $config->make_idepartments();
+ $this->config = $config;
/* This object must be tagged, so set ObjectTaggingRequested to true */
if($this->deptabs->by_object['department']->must_be_tagged()){
if ($this->dn != "new"){
del_lock ($this->dn);
}
- gosa_log ("Department object'".$this->dn."' has been saved");
unset ($this->deptabs);
$this->deptabs= NULL;
unset ($_SESSION['objectinfo']);
}
/* Headpage or normal plugin screen? */
- if ($this->deptabs != NULL){
+ if ($this->deptabs !== NULL){
/* Show main page (tabs) */
$display= $this->deptabs->execute();
if(empty($tmp2['dn'])){
$tmp2['dn']="/";
}
- $tmp2 ['description'][0] = _("..");
+ $tmp2 ['description'][0] = ".. "._("Back");
$result[$tmp[$base_back]]=$tmp2;
}
{
$ids = array();
foreach($_POST as $name => $value){
- if(preg_match("/^item_selected_[a-z0-9\=]*$/i",$name)){
+ if(preg_match("/^item_selected_[a-z0-9\\/\=]*$/i",$name)){
$id = preg_replace("/^item_selected_/","",$name);
$ids[$id] = $id;
}