Changeset 2366
- Timestamp:
- 06/15/10 07:35:37 (13 years ago)
- Location:
- plugins/antiflood
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/antiflood
-
Property
svn:ignore
set to
_disabled
-
Property
svn:ignore
set to
-
plugins/antiflood/_define.php
r217 r2366 15 15 /* Description*/ "Anti flood spam filter", 16 16 /* Author */ "dcTeam", 17 /* Version */ '0.5. 1',17 /* Version */ '0.5.2', 18 18 /* Permissions */ 'usage,contentadmin', 19 19 /* Priority */ 200 -
plugins/antiflood/class.dc.filter.antiflood.php
r217 r2366 20 20 private $table; 21 21 22 public function __construct( &$core)22 public function __construct($core) 23 23 { 24 24 parent::__construct($core); … … 26 26 $this->table = $core->prefix.'spamrule'; 27 27 $blog =& $this->core->blog; 28 $this->delay = $blog->settings-> flood_delay;29 $this->send_error = $blog->settings-> send_error;28 $this->delay = $blog->settings->antiflood->flood_delay; 29 $this->send_error = $blog->settings->antiflood->send_error; 30 30 31 31 if ($this->delay == null ) { 32 $blog->settings-> setNameSpace('antiflood');33 $blog->settings-> put('flood_delay',60,'integer','Delay in seconds beetween two comments from the same IP');32 $blog->settings->addNameSpace('antiflood'); 33 $blog->settings->antiflood->put('flood_delay',60,'integer','Delay in seconds beetween two comments from the same IP'); 34 34 $this->delay = 60; 35 35 } 36 36 if ($this->send_error == null ) { 37 $blog->settings-> setNameSpace('antiflood');38 $blog->settings-> put('send_error',false,'boolean','Whether the filter should reply with a 503 error code');37 $blog->settings->addNameSpace('antiflood'); 38 $blog->settings->antiflood->put('send_error',false,'boolean','Whether the filter should reply with a 503 error code'); 39 39 $this->send_error = false; 40 40 } … … 155 155 $blog =& $this->core->blog; 156 156 157 $flood_delay = $blog->settings-> flood_delay;158 $send_error = $blog->settings-> send_error;157 $flood_delay = $blog->settings->antiflood->flood_delay; 158 $send_error = $blog->settings->antiflood->send_error; 159 159 160 160 if (isset($_POST['flood_delay'])) … … 165 165 $send_error = isset($_POST['send_error']); 166 166 167 $blog->settings-> setNameSpace('antiflood');168 $blog->settings-> put('flood_delay',$flood_delay,'string');169 $blog->settings-> put('send_error',$send_error,'boolean');167 $blog->settings->addNameSpace('antiflood'); 168 $blog->settings->antiflood->put('flood_delay',$flood_delay,'string'); 169 $blog->settings->antiflood->put('send_error',$send_error,'boolean'); 170 170 171 171 http::redirect($url.'&up=1');
Note: See TracChangeset
for help on using the changeset viewer.