summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c62fc9)
raw | patch | inline | side by side (parent: 2c62fc9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Apr 2010 12:12:05 +0000 (12:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Apr 2010 12:12:05 +0000 (12:12 +0000) |
-Removed several duplicate methods
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17838 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17838 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_SnapShotDialog.inc | patch | blob | history | |
gosa-core/include/class_ldap.inc | patch | blob | history | |
gosa-core/include/class_management.inc | patch | blob | history |
diff --git a/gosa-core/include/class_SnapShotDialog.inc b/gosa-core/include/class_SnapShotDialog.inc
index 0c56e49bdbf9b3c358aaab7475f83e8b09c502ef..eca00222e5c659292037d028efc6488eeaf6386a 100644 (file)
$this->del_dn = $entry;
$smarty= get_smarty();
$smarty->assign("info", sprintf(_("You are about to delete the snapshot %s."), bold(LDAP::fix($this->del_dn))));
- return($smarty->fetch (get_template_path('removeEntries.tpl')));
+ return($smarty->fetch (get_template_path('removeSnapshots.tpl')));
}
}
}
- /* Remove snapshot */
- if(isset($_POST['delete_confirm']) && !empty($this->del_dn)){
- $this->remove_snapshot($this->del_dn);
- $this->del_dn = "";
- }
-
/* We must restore a snapshot */
if($this->display_restore_dialog){
index f888d84448df0e784076bc619191821e800e62b2..1a991f1b6e122ba7466593abe2bd1ec1336cda9a 100644 (file)
$cmd = "ldapsearch -x -LLLL '{$filter}' {$limit} {$scope} -H '{$host}' -b '{$dn}' $attrs";
exec($cmd, $ret,$code);
$res = implode($ret,"\n");
- print_a(array($res,$cmd, $ret,$code));
return($res);
}
index 4bfc64edf4e8baa31daa129608b4bbd8a1f9fdb0..2e42c572eca2fd1fd97b342d2064e1a900a9775a 100644 (file)
$this->registerAction("restore", "restoreSnapshotDialog");
$this->registerAction("saveSnapshot","saveSnapshot");
$this->registerAction("restoreSnapshot","restoreSnapshot");
+ $this->registerAction("removeSnapshotConfirmed","removeSnapshotConfirmed");
$this->registerAction("cancelSnapshot","closeDialogs");
$this->registerAction("config-filter","editFilter");
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_snapshot_confirm'])) $action['action'] = "removeSnapshotConfirmed";
if(isset($_POST['delete_cancel'])) $action['action'] = "cancelDelete";
if(isset($_POST['saveFilter'])) $action['action'] = "saveFilter";
if(isset($_POST['cancelFilter'])) $action['action'] = "cancelFilter";
}
+ /*! \brief Removes a snapshot object.
+ */
+ function removeSnapshotConfirmed($action="",$target=array(),$all=array())
+ {
+ $entry = $this->dialogObject->del_dn;
+ if(!empty($entry) && $this->ui->allow_snapshot_create($entry,$this->aclCategory)){
+ $this->snapHandler->remove_snapshot($entry);
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$entry,"Snaptshot removed!");
+ }else{
+ msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to remove a snapshot for %s!"), bold($entry)),
+ ERROR_DIALOG);
+ }
+ }
+
+
/*! \brief Displays the "Restore snapshot dialog" for a given target.
* If no target is specified, open the restore removed object
* dialog.