[Svn] r2174 - trunk/roundcubemail/program/steps/mail

trac at roundcube.net trac at roundcube.net
Thu Dec 18 18:03:55 CET 2008


Author: alec
Date: 2008-12-18 11:03:55 -0600 (Thu, 18 Dec 2008)
New Revision: 2174

Modified:
   trunk/roundcubemail/program/steps/mail/sendmail.inc
Log:
#1485493: do not bypass sendmail_delay by relogin


Modified: trunk/roundcubemail/program/steps/mail/sendmail.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/sendmail.inc	2008-12-18 14:44:12 UTC (rev 2173)
+++ trunk/roundcubemail/program/steps/mail/sendmail.inc	2008-12-18 17:03:55 UTC (rev 2174)
@@ -36,18 +36,20 @@
   $OUTPUT->send('iframe');
 }
 
-if (!$savedraft && empty($_POST['_to']) && empty($_POST['_cc']) && empty($_POST['_bcc']) && empty($_POST['_subject']) && $_POST['_message']) {
-  $OUTPUT->show_message('sendingfailed', 'error');
-  $OUTPUT->send('iframe');
-}
+if (!$savedraft) {
+  if (empty($_POST['_to']) && empty($_POST['_cc']) && empty($_POST['_bcc'])
+    && empty($_POST['_subject']) && $_POST['_message']) {
+    $OUTPUT->show_message('sendingfailed', 'error');
+    $OUTPUT->send('iframe');
+  }
 
-if(!$savedraft && !empty($CONFIG['sendmail_delay'])) {
-  $wait_sec = time() - intval($CONFIG['sendmail_delay']) - intval($_SESSION['last_message_time']);
-  if($wait_sec < 0)
-    {
-    $OUTPUT->show_message('senttooquickly', 'error', array('sec' => $wait_sec * -1));
-    $OUTPUT->send('iframe');
+  if(!empty($CONFIG['sendmail_delay'])) {
+    $wait_sec = time() - intval($CONFIG['sendmail_delay']) - intval($CONFIG['last_message_time']);
+    if($wait_sec < 0) {
+      $OUTPUT->show_message('senttooquickly', 'error', array('sec' => $wait_sec * -1));
+      $OUTPUT->send('iframe');
     }
+  }
 }
 
 
@@ -372,7 +374,7 @@
 
   // save message sent time
   if (!empty($CONFIG['sendmail_delay']))
-    $_SESSION['last_message_time'] = time();
+    $RCMAIL->user->save_prefs(array('last_message_time' => time()));
   
   // set replied/forwarded flag
   if ($_SESSION['compose']['reply_uid'])

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list