[geeklog-cvs] geeklog: Updated the speed limit message for sending emails to u...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Oct 4 20:06:04 EDT 2010


changeset 7979:7ae3f2f44055
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7ae3f2f44055
user: Tom <websitemaster at cogeco.net>
date: Mon Oct 04 20:04:44 2010 -0400
description:
Updated the speed limit message for sending emails to users.

diffstat:

 language/english_utf-8.php |   4 +++-
 public_html/profiles.php   |  14 +++++++++++---
 2 files changed, 14 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 05414881d63e -r 7ae3f2f44055 language/english_utf-8.php
--- a/language/english_utf-8.php	Thu Sep 23 14:05:58 2010 -0400
+++ b/language/english_utf-8.php	Mon Oct 04 20:04:44 2010 -0400
@@ -458,7 +458,9 @@
     35 => 'Sorry, this user prefers not to receive any emails.',
     36 => 'Copy:',
     37 => 'Send me a copy of this email',
-    38 => "This is a copy of the email that you sent to %s from <{$_CONF['site_url']}>:"
+    38 => "This is a copy of the email that you sent to %s from <{$_CONF['site_url']}>:",
+    39 => 'Your last message was ',
+    40 => " seconds ago.  This site requires at least {$_CONF['speedlimit']} seconds between sending messages"    
 );
 
 ###############################################################################
diff -r 05414881d63e -r 7ae3f2f44055 public_html/profiles.php
--- a/public_html/profiles.php	Thu Sep 23 14:05:58 2010 -0400
+++ b/public_html/profiles.php	Mon Oct 04 20:04:44 2010 -0400
@@ -50,7 +50,7 @@
 */
 function contactemail($uid,$author,$authoremail,$subject,$message)
 {
-    global $_CONF, $_TABLES, $_USER, $LANG04, $LANG08;
+    global $_CONF, $_TABLES, $_USER, $LANG04, $LANG08, $LANG12;
 
     $retval = '';
 
@@ -76,8 +76,16 @@
 
     // check mail speedlimit
     COM_clearSpeedlimit ($_CONF['speedlimit'], 'mail');
-    if (COM_checkSpeedlimit ('mail') > 0) {
-        return COM_refresh ($_CONF['site_url'] . '/index.php?msg=85');
+    $last = COM_checkSpeedlimit ('mail');
+    if ($last > 0) {
+        $retval = COM_siteHeader('menu', $LANG04[81]);
+        $retval .= COM_startBlock ($LANG12[26], '',
+                            COM_getBlockTemplate ('_msg_block', 'header'))
+                . $LANG08[39] . $last . $LANG08[40]
+                . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
+        $retval .= COM_siteFooter();
+        
+        return $retval;
     }
 
     if (!empty($author) && !empty($subject) && !empty($message)) {



More information about the geeklog-cvs mailing list