]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Cosmetic changes to RegisterThrottle
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 7 Mar 2014 20:01:03 +0000 (21:01 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 7 Mar 2014 20:03:38 +0000 (21:03 +0100)
plugins/RegisterThrottle/RegisterThrottlePlugin.php
plugins/RegisterThrottle/classes/Registration_ip.php

index a049bfc4972e6b29784e6c0e52bc5fd48d616544..251a2b4c7967207104f0bc5357f132d65bc9af83 100644 (file)
@@ -28,9 +28,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Throttle registration by IP address
@@ -74,7 +72,7 @@ class RegisterThrottlePlugin extends Plugin
      *
      * @return boolean hook value; true means continue processing, false means stop.
      */
-    function onCheckSchema()
+    public function onCheckSchema()
     {
         $schema = Schema::get();
 
@@ -93,7 +91,7 @@ class RegisterThrottlePlugin extends Plugin
      *
      * @return boolean hook value
      */
-    function onStartRegistrationTry($action)
+    public function onStartRegistrationTry($action)
     {
         $ipaddress = $this->_getIpAddress();
 
@@ -176,7 +174,7 @@ class RegisterThrottlePlugin extends Plugin
      *
      * @return boolean hook value
      */
-    function onPluginVersion(&$versions)
+    public function onPluginVersion(&$versions)
     {
         $versions[] = array('name' => 'RegisterThrottle',
                             'version' => GNUSOCIAL_VERSION,
@@ -242,7 +240,7 @@ class RegisterThrottlePlugin extends Plugin
      *
      * @return boolean hook value
      */
-    function onEndGrantRole($profile, $role)
+    public function onEndGrantRole($profile, $role)
     {
         if (!self::$enabled) {
             return true;
index 431b6c0562816f49a1cc677d09a6e872353a15c2..9b28192311c037129bdcd1ad9ffdd14d6dc9ca0c 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
-
-require_once INSTALLDIR . '/classes/Memcached_DataObject.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Data class for storing IP addresses of new registrants.
@@ -46,7 +42,7 @@ class Registration_ip extends Managed_DataObject
 {
     public $__table = 'registration_ip';     // table name
     public $user_id;                         // int(4)  primary_key not_null
-    public $ipaddress;                       // varchar(15)
+    public $ipaddress;                       // varchar(45)
     public $created;                         // datetime()   not_null
     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP