diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-12-18 17:03:55 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-12-18 17:03:55 +0000 |
| commit | b75bb3260e56c70fdeec986276089c0c57b3bcc7 (patch) | |
| tree | 9ae6116ef8e792475566c833c9a2df376ca86290 /roundcubemail/program/steps | |
| parent | 498a8e85f358a26617b7758f6cdcb950d52b7405 (diff) | |
#1485493: do not bypass sendmail_delay by relogin
git-svn-id: https://svn.roundcube.net/trunk@2174 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/mail/sendmail.inc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc index 7ee6dd4cc..20f90794b 100644 --- a/roundcubemail/program/steps/mail/sendmail.inc +++ b/roundcubemail/program/steps/mail/sendmail.inc @@ -36,18 +36,20 @@ if (!isset($_SESSION['compose']['id'])) { $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 && !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)); +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(!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 @@ if (!$savedraft) // 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']) |
