index 31573b68f2b1d9a83b110422c069a1e97c41f951..a8bd21d8106a3447c4654cf41f917ebb8b79b63c 100644 (file)
$this->registerAction("apply", "applyChanges");
$this->registerAction("save", "saveChanges");
$this->registerAction("cancel", "cancelEdit");
+ $this->registerAction("cancelDelete", "cancelEdit");
$this->registerAction("remove", "removeEntryRequested");
$this->registerAction("removeConfirmed", "removeEntryConfirmed");
$this->registerAction("saveSnapshot","saveSnapshot");
$this->registerAction("restoreSnapshot","restoreSnapshot");
$this->registerAction("cancelSnapshot","closeDialogs");
-
}
/*! \brief Execute this plugin
* @param Array 'target' A list of object dns, which should be affected by this method.
* @param Array 'all' A combination of both 'action' and 'target'.
*/
- protected function removeEntryRequested($action,$target,$all)
+ protected function removeEntryRequested($action="",$target=array(),$all=array())
{
$disallowed = array();
$this->dns = array();
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$target,"Entry removel requested!");
+
// Check permissons for each target
foreach($target as $dn){
$acl = $this->ui->get_permissions($dn, $this->aclCategory."/".$this->aclPlugin);
if(!empty($altTabType)) $tabType = $altTabType;
if(!empty($altAclCategory)) $aclCategory = $altAclCategory;
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$target,"Entry removel confirmed!");
+
foreach($this->dns as $key => $dn){
// Check permissions, are we allowed to remove this object?
if(isset($_POST['edit_finish'])) $action['action'] = "save";
if(isset($_POST['edit_cancel'])) $action['action'] = "cancel";
if(isset($_POST['delete_confirmed'])) $action['action'] = "removeConfirmed";
+ if(isset($_POST['delete_cancel'])) $action['action'] = "cancelDelete";
// Detect Snapshot actions
if(isset($_POST['CreateSnapshot'])) $action['action'] = "saveSnapshot";
*/
function createSnapshotDialog($action="",$target=array(),$all=array())
{
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$target,"Snaptshot creation initiated!");
+
foreach($target as $entry){
if(!empty($entry) && $this->ui->allow_snapshot_create($entry,$this->aclCategory)){
$this->dialogObject = new SnapShotDialog($this->config,$entry,$this);
* @param Array 'target' A list of object dns, which should be affected by this method.
* @param Array 'all' A combination of both 'action' and 'target'.
*/
- function saveSnapsho($action="",$target=array(),$all=array())
+ function saveSnapshot($action="",$target=array(),$all=array())
{
$this->dialogObject->save_object();
$msgs = $this->dialogObject->check();
}else{
$this->dn = $this->dialogObject->dn;
$this->snapHandler->create_snapshot( $this->dn,$this->dialogObject->CurrentDescription);
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Snaptshot created!");
$this->closeDialogs();
}
}
$entry = array_pop($target);
if(!empty($entry) && $this->ui->allow_snapshot_restore($entry,$this->aclCategory)){
$this->snapHandler->restore_snapshot($entry);
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Snaptshot restored!");
$this->closeDialogs();
}else{
msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to restore a snapshot for %s."),$entry),
if(!count($target)){
$entry = $this->headpage->getBase();
if(!empty($entry) && $this->ui->allow_snapshot_restore($entry,$this->aclCategory)){
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$entry,"Snaptshot restoring initiated!");
$this->dialogObject = new SnapShotDialog($this->config,$entry,$this);
$this->dialogObject->set_snapshot_bases($bases);
$this->dialogObject->display_all_removed_objects = true;
// Display the restore points for a given object.
$entry = array_pop($target);
if(!empty($entry) && $this->ui->allow_snapshot_restore($entry,$this->aclCategory)){
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$entry,"Snaptshot restoring initiated!");
$this->dialogObject = new SnapShotDialog($this->config,$entry,$this);
$this->dialogObject->set_snapshot_bases($bases);
$this->dialogObject->display_restore_dialog = true;
}else{
$this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory);
$this->tabObject->set_acl_base($this->headpage->getBase());
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Create new entry initiated!");
}
}
}else{
$tab = $tabClass;
$this->tabObject= new $tab($this->config,$this->config->data['TABS'][$tabType], $this->dn,$aclCategory);
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Edit entry initiated!");
$this->tabObject->set_acl_base($this->dn);
}
}else{
return($tmp->display_lock_message());
}
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dns,"Edit entry initiated!");
+
// Now lock entries.
$tmp->lock_entries($this->ui->dn);
if($tmp->multiple_available()){
return("");
}else{
$this->tabObject->save();
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dns,"Entry saved!");
$this->remove_lock();
$this->closeDialogs();
}
return("");
}else{
$this->tabObject->save();
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dns,"Modifications applied!");
$this->tabObject->re_init();
}
}
foreach($target as $dn){
if($action == "copy" && $this->ui->is_copyable($dn,$aclCategory,$aclPlugin)){
$this->cpHandler->add_to_queue($dn,"copy",$tabClass,$tabType,$aclCategory);
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$dn,"Entry copied!");
}
if($action == "cut" && $this->ui->is_cutable($dn,$aclCategory,$aclPlugin)){
$this->cpHandler->add_to_queue($dn,"cut",$tabClass,$tabType,$aclCategory);
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$dn,"Entry cutted!");
}
}
}