Cosmetic changes to RegisterThrottle
This commit is contained in:
parent
a35bf227fb
commit
326ad9376e
|
@ -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;
|
||||
|
|
|
@ -27,11 +27,7 @@
|
|||
* 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user