summaryrefslogtreecommitdiff
path: root/plugins/RegisterThrottle
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/RegisterThrottle')
-rw-r--r--plugins/RegisterThrottle/RegisterThrottlePlugin.php5
-rw-r--r--plugins/RegisterThrottle/Registration_ip.php6
-rw-r--r--plugins/RegisterThrottle/locale/RegisterThrottle.pot14
3 files changed, 11 insertions, 14 deletions
diff --git a/plugins/RegisterThrottle/RegisterThrottlePlugin.php b/plugins/RegisterThrottle/RegisterThrottlePlugin.php
index 05709b780..b6e9a9026 100644
--- a/plugins/RegisterThrottle/RegisterThrottlePlugin.php
+++ b/plugins/RegisterThrottle/RegisterThrottlePlugin.php
@@ -113,7 +113,6 @@ class RegisterThrottlePlugin extends Plugin
* @return boolean hook value
*
*/
-
function onStartRegistrationTry($action)
{
$ipaddress = $this->_getIpAddress();
@@ -134,7 +133,7 @@ class RegisterThrottlePlugin extends Plugin
$now = time();
$this->debug("Comparing {$regtime} to {$now}");
if ($now - $regtime < $seconds) {
- throw new Exception(_("Too many registrations. Take a break and try again later."));
+ throw new Exception(_m("Too many registrations. Take a break and try again later."));
}
}
}
@@ -197,7 +196,7 @@ class RegisterThrottlePlugin extends Plugin
'author' => 'Evan Prodromou',
'homepage' => 'http://status.net/wiki/Plugin:RegisterThrottle',
'description' =>
- _m('Throttles excessive registration from a single IP.'));
+ _m('Throttles excessive registration from a single IP address.'));
return true;
}
diff --git a/plugins/RegisterThrottle/Registration_ip.php b/plugins/RegisterThrottle/Registration_ip.php
index 7e61d089e..5c7396b9b 100644
--- a/plugins/RegisterThrottle/Registration_ip.php
+++ b/plugins/RegisterThrottle/Registration_ip.php
@@ -42,7 +42,6 @@ require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
-
class Registration_ip extends Memcached_DataObject
{
public $__table = 'registration_ip'; // table name
@@ -59,7 +58,6 @@ class Registration_ip extends Memcached_DataObject
* @return User_greeting_count object found, or null for no hits
*
*/
-
function staticGet($k, $v=null)
{
return Memcached_DataObject::staticGet('Registration_ip', $k, $v);
@@ -70,7 +68,6 @@ class Registration_ip extends Memcached_DataObject
*
* @return array array of column definitions
*/
-
function table()
{
return array('user_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
@@ -86,7 +83,6 @@ class Registration_ip extends Memcached_DataObject
*
* @return array key definitions
*/
-
function keys()
{
return array('user_id' => 'K');
@@ -100,7 +96,6 @@ class Registration_ip extends Memcached_DataObject
*
* @return array key definitions
*/
-
function keyTypes()
{
return $this->keys();
@@ -116,7 +111,6 @@ class Registration_ip extends Memcached_DataObject
*
* @return array magic three-false array that stops auto-incrementing.
*/
-
function sequenceKey()
{
return array(false, false, false);
diff --git a/plugins/RegisterThrottle/locale/RegisterThrottle.pot b/plugins/RegisterThrottle/locale/RegisterThrottle.pot
index 40327d16f..97539f9a0 100644
--- a/plugins/RegisterThrottle/locale/RegisterThrottle.pot
+++ b/plugins/RegisterThrottle/locale/RegisterThrottle.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-09-14 22:56+0000\n"
+"POT-Creation-Date: 2010-09-18 22:06+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,14 +16,18 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: RegisterThrottlePlugin.php:122 RegisterThrottlePlugin.php:161
+#: RegisterThrottlePlugin.php:121 RegisterThrottlePlugin.php:160
msgid "Cannot find IP address."
msgstr ""
-#: RegisterThrottlePlugin.php:167
+#: RegisterThrottlePlugin.php:136
+msgid "Too many registrations. Take a break and try again later."
+msgstr ""
+
+#: RegisterThrottlePlugin.php:166
msgid "Cannot find user after successful registration."
msgstr ""
-#: RegisterThrottlePlugin.php:200
-msgid "Throttles excessive registration from a single IP."
+#: RegisterThrottlePlugin.php:199
+msgid "Throttles excessive registration from a single IP address."
msgstr ""