From 7f5a849e7816e7b4c7b13a72d38a9c777632d7cd Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 07 Jul 2011 07:44:26 -0400
Subject: [PATCH] - Added possibility to undo last contact delete operation

---
 program/steps/addressbook/func.inc |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 4c930c8..a895b61 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -88,6 +88,12 @@
     $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)

--
Gitblit v1.9.1