summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/addressbook/func.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-07-07 11:44:26 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-07-07 11:44:26 +0000
commit642cb7e4357030d61f9ff56498aeaa590c7699cf (patch)
treedef4e09ccdb7d3211eff3a61fc79c9b1577b5ddf /roundcubemail/program/steps/addressbook/func.inc
parentac1af6d3daf377002fb9875c49dde0a0025a980a (diff)
- Added possibility to undo last contact delete operation
git-svn-id: https://svn.roundcube.net/trunk@4916 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/addressbook/func.inc')
-rw-r--r--roundcubemail/program/steps/addressbook/func.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc
index 4c930c80b..a895b617f 100644
--- a/roundcubemail/program/steps/addressbook/func.inc
+++ b/roundcubemail/program/steps/addressbook/func.inc
@@ -88,6 +88,12 @@ if (!$RCMAIL->action && !$OUTPUT->ajax_call) {
$CONTACTS = rcmail_contact_source($source, true);
}
+// remove undo information...
+if ($undo = $_SESSION['contact_undo']) {
+ // ...after 30 seconds
+ if ($undo['ts'] < time() - 30)
+ $RCMAIL->session->remove('contact_undo');
+}
// instantiate a contacts object according to the given source
function rcmail_contact_source($source=null, $init_env=false)