Changeset 1793 in subversion
- Timestamp:
- Sep 15, 2008 2:53:18 AM (5 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 6 edited
-
CHANGELOG (modified) (1 diff)
-
config/main.inc.php.dist (modified) (1 diff)
-
program/localization/en_GB/messages.inc (modified) (1 diff)
-
program/localization/en_US/messages.inc (modified) (1 diff)
-
program/localization/pl_PL/messages.inc (modified) (1 diff)
-
program/steps/mail/sendmail.inc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r1776 r1793 1 1 CHANGELOG RoundCube Webmail 2 2 --------------------------- 3 4 2008/09/15 (alec) 5 ---------- 6 - Added 'sendmail_delay' option to restrict messages sending interval (#1484491) 3 7 4 8 2008/09/12 (alec) -
trunk/roundcubemail/config/main.inc.php.dist
r1722 r1793 107 107 // Log sent messages 108 108 $rcmail_config['smtp_log'] = TRUE; 109 110 // how many seconds must pass between emails sent by a user 111 $rcmail_config['sendmail_delay'] = 0; 109 112 110 113 // these cols are shown in the message list -
trunk/roundcubemail/program/localization/en_GB/messages.inc
r1788 r1793 41 41 $messages['contactnotfound'] = 'The requested contact was not found'; 42 42 $messages['sendingfailed'] = 'Failed to send message'; 43 $messages['senttooquickly'] = 'You have to wait $sec sec. to sent the message'; 43 44 $messages['errorsavingsent'] = 'An error occured while saving sent message'; 44 45 $messages['errorsaving'] = 'An error occured while saving'; -
trunk/roundcubemail/program/localization/en_US/messages.inc
r1788 r1793 41 41 $messages['contactnotfound'] = 'The requested contact was not found'; 42 42 $messages['sendingfailed'] = 'Failed to send message'; 43 $messages['senttooquickly'] = 'You have to wait $sec sec. to sent the message'; 43 44 $messages['errorsavingsent'] = 'An error occured while saving sent message'; 44 45 $messages['errorsaving'] = 'An error occured while saving'; -
trunk/roundcubemail/program/localization/pl_PL/messages.inc
r1788 r1793 52 52 $messages['contactnotfound'] = 'Szukany kontakt nie zostaÅ odnaleziony'; 53 53 $messages['sendingfailed'] = 'Nie udaÅo siÄ wysÅaÄ wiadomoÅci!'; 54 $messages['senttooquickly'] = 'Musisz poczekaÄ $sec sek. aby móc wysÅaÄ tÄ 55 wiadomoÅÄ!'; 54 56 $messages['errorsavingsent'] = 'WystÄ 55 57 piÅ bÅÄ -
trunk/roundcubemail/program/steps/mail/sendmail.inc
r1755 r1793 26 26 $OUTPUT->framed = TRUE; 27 27 28 $savedraft = !empty($_POST['_draft']) ? TRUE : FALSE; 29 30 /****** checks ********/ 28 31 29 32 if (!isset($_SESSION['compose']['id'])) { … … 34 37 } 35 38 39 if (!$savedraft && empty($_POST['_to']) && empty($_POST['_cc']) && empty($_POST['_bcc']) && empty($_POST['_subject']) && $_POST['_message']) { 40 $OUTPUT->show_message('sendingfailed', 'error'); 41 $OUTPUT->send('iframe'); 42 } 43 44 if(!$savedraft && !empty($CONFIG['sendmail_delay'])) { 45 $wait_sec = time() - intval($CONFIG['sendmail_delay']) - intval($_SESSION['last_message_time']); 46 if($wait_sec < 0) 47 { 48 $OUTPUT->show_message('senttooquickly', 'error', array('sec' => $wait_sec * -1)); 49 $OUTPUT->send('iframe'); 50 } 51 } 52 36 53 37 54 /****** message sending functions ********/ 38 39 55 40 56 // get identity record … … 117 133 } 118 134 135 136 /****** compose message ********/ 137 119 138 if (strlen($_POST['_draft_saveid']) > 3) 120 139 $olddraftmessageid = get_input_value('_draft_saveid', RCUBE_INPUT_POST); 121 140 122 141 $message_id = sprintf('<%s@%s>', md5(uniqid('rcmail'.rand(),true)), $RCMAIL->config->mail_domain($_SESSION['imap_host'])); 123 $savedraft = !empty($_POST['_draft']) ? TRUE : FALSE;124 125 126 /****** check submission and compose message ********/127 128 129 if (!$savedraft && empty($_POST['_to']) && empty($_POST['_cc']) && empty($_POST['_bcc']) && empty($_POST['_subject']) && $_POST['_message'])130 {131 $OUTPUT->show_message("sendingfailed", 'error');132 $OUTPUT->send('iframe');133 return;134 }135 136 142 137 143 // set default charset … … 347 353 $OUTPUT->show_message("sendingfailed", 'error'); 348 354 $OUTPUT->send('iframe'); 349 return; 350 } 355 } 356 357 // save message sent time 358 if (!empty($CONFIG['sendmail_delay'])) 359 $_SESSION['last_message_time'] = time(); 351 360 352 361 // set replied/forwarded flag
Note: See TracChangeset
for help on using the changeset viewer.
