mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Add several columns to spamfilter IP & word tables for feature consistency and extensibility #1882
This commit is contained in:
parent
e1f98e573c
commit
020b85168c
11 changed files with 94 additions and 30 deletions
|
|
@ -211,6 +211,15 @@ class spamfilterAdminController extends spamfilter
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if (preg_match('/^(.+?)#(.+)$/', $word, $matches))
|
||||
{
|
||||
$word = trim($matches[1]);
|
||||
$description = trim($matches[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$description = null;
|
||||
}
|
||||
|
||||
if (mb_strlen($word, 'UTF-8') < 2 || mb_strlen($word, 'UTF-8') > 180)
|
||||
{
|
||||
|
|
@ -219,6 +228,8 @@ class spamfilterAdminController extends spamfilter
|
|||
|
||||
$args = new stdClass;
|
||||
$args->word = $word;
|
||||
$args->description = $description;
|
||||
$args->is_regexp = preg_match('#^/.+/$#', $word) ? 'Y' : 'N';
|
||||
$output = executeQuery('spamfilter.insertDeniedWord', $args);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue