summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/func.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-07-07 11:44:26 +0000
committeralecpl <alec@alec.pl>2011-07-07 11:44:26 +0000
commit7f5a849e7816e7b4c7b13a72d38a9c777632d7cd (patch)
tree604bc75dad74b55b02033a8472a3f2076b9989eb /program/steps/addressbook/func.inc
parent632528ff4281fbceedb828969bd355f21106529c (diff)
- Added possibility to undo last contact delete operation
Diffstat (limited to 'program/steps/addressbook/func.inc')
-rw-r--r--program/steps/addressbook/func.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 4c930c80b..a895b617f 100644
--- a/program/steps/addressbook/func.inc
+++ b/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)