summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5262383)
raw | patch | inline | side by side (parent: 5262383)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Oct 2009 15:32:38 +0000 (15:32 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 30 Oct 2009 15:32:38 +0000 (15:32 +0000) |
-Removed unused move code.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14719 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14719 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/departments/class_departmentManagement.inc | patch | blob | history | |
gosa-core/plugins/admin/departments/tabs_department.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc
index 24dbdca973c0c9869c2bca81bf84fb432dece327..5397a3620af1f3f351694fe90bac778b26561e50 100644 (file)
return(management::editEntry($action,$target,$all,$this->tabClass,$types[$type]['TAB'],$this->aclCategory));
}
+ protected function saveChanges()
+ {
+ management::saveChanges();
+
+ if($this->last_tabObject->am_i_moved()){
+ return($smarty->fetch(get_template_path("dep_move_confirm.tpl",TRUE)));
+ }
+ }
+
+
function openEntry($action,$entry)
{
$this->headpage->setBase(array_pop($entry));
diff --git a/gosa-core/plugins/admin/departments/tabs_department.inc b/gosa-core/plugins/admin/departments/tabs_department.inc
index dcb1fef10b1c98730c351b5c5cd4f4481841df55..c3d23e567c7873925630e60d783b99c297031206 100644 (file)
return (tabs::check(TRUE));
}
-
- /*! \brief Check if the department must must be moved
- return Boolean TRUE if we have to move the dep, else FALSE
- */
- function am_i_moved()
- {
- return(FALSE);
- if($this->moved) return(FALSE);
- $baseobject= &$this->by_object[$this->base_name];
-
- $namingAttr = $baseobject->namingAttr;
- $orig_namingAttr = $baseobject->orig_namingAttr;
-
- $value = preg_replace('/,/', '\,', $baseobject->$namingAttr);
- $orig_value = preg_replace('/,/', '\,', $baseobject->$orig_namingAttr);
-
- $new_dn = @LDAP::convert($namingAttr.'='.$value.','.$baseobject->base);
- $old_dn = @LDAP::convert($namingAttr.'='.$orig_value.','.$baseobject->orig_base);
-
- if ($this->dn != $new_dn && $this->dn != "new"){
- return(TRUE);
- }
- return(FALSE);
- }
-
-
- /*! \brief Checks if the department was moved successfully
- @return Boolean TRUE if the dep was already moved.
- */
- function move_done()
- {
- return($this->moved);
- }
-
-
- /*! \brief Initiate recursive move
- */
- function move_me()
- {
- if(!$this->am_i_moved()) return;
- $baseobject= &$this->by_object[$this->base_name];
- $ou = preg_replace('/,/', '\,', $baseobject->ou);
- $new_dn = @LDAP::convert('ou='.$ou.','.$baseobject->base);
- $old_ou = preg_replace('/,/', '\,', $baseobject->orig_ou);
- $old_dn = @LDAP::convert('ou='.$ou.','.$baseobject->orig_base);
- if ($this->dn != $new_dn && $this->dn != "new"){
- $baseobject->recursive_move($this->dn, $new_dn);
- $this->moved= TRUE;
- }
- }
-
-
function save($ignore_account= FALSE)
{
$baseobject= &$this->by_object[$this->base_name];
-
$namingAttr = $baseobject->namingAttr;
-
$nAV = preg_replace('/,/', '\,', $baseobject->$namingAttr);
$new_dn = @LDAP::convert($namingAttr.'='.$nAV.','.$baseobject->base);
$config->get_departments();
}
-
$this->dn= $new_dn;
$baseobject->dn= $this->dn;
if (!$ignore_account){
tabs::save(TRUE);
}
}
-
-
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>