summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3169b4b)
raw | patch | inline | side by side (parent: 3169b4b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 May 2008 09:16:15 +0000 (09:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 May 2008 09:16:15 +0000 (09:16 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10908 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/groups/class_groupManagement.inc | patch | blob | history | |
gosa-core/plugins/admin/groups/main.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc
index 5cd2c527c7219599b3895f028dca35b61b3228a3..bcb71bd1a624236b73c6d8833bdedb25cadc5a4b 100644 (file)
var $ShowPrimaryCheckBox= false;
var $start_pasting_copied_objects = FALSE;
+ var $dns = array();
+
function groupManagement (&$config, &$ui)
{
/* Save configuration for internal use */
if (!isset($_POST['edit_apply'])){
/* Group has been saved successfully, remove lock from LDAP. */
if ($this->dn != "new"){
- del_lock ($this->dn);
+ $this->remove_lock();
}
/* There's no page reload so we have to read new groups at this point. */
if(count($ids)){
+ $this->dns = array();
foreach($ids as $id){
- $dn = $this->grouplist[$id]['dn'];
- if (($user= get_lock($dn)) != ""){
- return(gen_locked_message ($user, $dn));
- }
- $this->dns[$id] = $dn;
+ $this->dns[$id] = $this->grouplist[$id]['dn'];
+ }
+
+ /* Check locks */
+ if ($user= get_multiple_locks($this->dns)){
+ return(gen_locked_message($user,$this->dns));
}
$dns_names = array();
foreach($this->dns as $dn){
- add_lock ($dn, $this->ui->dn);
$dns_names[] =@LDAP::fix($dn);
}
+ add_lock ($this->dns, $this->ui->dn);
/* Lock the current entry, so nobody will edit it during deletion */
$smarty->assign("info", msgPool::deleteInfo($dns_names,_("group")));
msg_dialog::display(_("Permission error"), msgPool::permDelete(), ERROR_DIALOG);
new log("security","groups/".get_class($this),$dn,array(),"Tried to trick deletion.");
}
- /* Remove lock file after successfull deletion */
- del_lock ($dn);
- unset($this->dns[$key]);
}
+
+ /* Remove lock file after successfull deletion */
+ $this->remove_lock();
+ $this->dns = array();
}
/* Remove lock */
if(isset($_POST['delete_multiple_user_cancel'])){
- foreach($this->dns as $key => $dn){
- del_lock ($dn);
- unset($this->dns[$key]);
- }
+
+ /* Remove lock file after successfull deletion */
+ $this->remove_lock();
+ $this->dns = array();
}
}
/* Remove lock file after successfull deletion */
- del_lock ($this->dn);
+ $this->remove_lock();
session::un_set('objectinfo');
}
/* Delete group canceled? */
if (isset($_POST['delete_cancel'])){
- del_lock ($this->dn);
+ $this->remove_lock();
session::un_set('objectinfo');
}
/* Cancel dialogs */
if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
if(isset($this->grouptab->dn)){
- del_lock ($this->grouptab->dn);
+ $this->remove_lock();
}
- unset ($this->grouptab);
$this->grouptab= NULL;
session::un_set('objectinfo');
}
if (isset($this->grouptab->dn)){
del_lock ($this->grouptab->dn);
}
+ if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
+ del_lock($this->dn);
+ }
+ if(isset($this->dns) && is_array($this->dns) && count($this->dns)){
+ del_lock($this->dns);
+ }
}
index 6bbaeb9ef4e1d7bb148bae764ccee59ff3d00f30..aeb3b0febfc9ad975dbff88e6b933923c4f792df 100644 (file)
if(session::is_set('groupManagement')){
$groupManagement = session::get('groupManagement');
$groupManagement->remove_lock();
- del_lock ($ui->dn);
session::un_set ('groupManagement');
}
} else {