mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 16:52:16 +09:00
Add hit counter and latest hit timer to IP spamfilter
This commit is contained in:
parent
853d6753eb
commit
1bf488e367
6 changed files with 52 additions and 13 deletions
|
|
@ -47,7 +47,8 @@ class spamfilter extends ModuleObject
|
|||
*/
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_word', 'hit')) return true;
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_word', 'latest_hit')) return true;
|
||||
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_ip', 'hit')) return true;
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_ip', 'latest_hit')) return true;
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_ip', 'description')) return true;
|
||||
|
||||
if(!$oModuleModel->getTrigger('document.manage', 'spamfilter', 'controller', 'triggerManageDocument', 'before'))
|
||||
|
|
@ -102,7 +103,16 @@ class spamfilter extends ModuleObject
|
|||
$oDB->addColumn('spamfilter_denied_word','latest_hit','date');
|
||||
$oDB->addIndex('spamfilter_denied_word','idx_latest_hit', 'latest_hit');
|
||||
}
|
||||
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_ip', 'hit'))
|
||||
{
|
||||
$oDB->addColumn('spamfilter_denied_ip','hit','number',12,0,true);
|
||||
$oDB->addIndex('spamfilter_denied_ip','idx_hit', 'hit');
|
||||
}
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_ip', 'latest_hit'))
|
||||
{
|
||||
$oDB->addColumn('spamfilter_denied_ip','latest_hit','date');
|
||||
$oDB->addIndex('spamfilter_denied_ip','idx_latest_hit', 'latest_hit');
|
||||
}
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_ip', 'description'))
|
||||
{
|
||||
$oDB->addColumn('spamfilter_denied_ip','description','varchar', 250);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue