Delete display keyword select setting.

This commit is contained in:
BJRambo 2017-08-08 18:43:24 +09:00
parent ced76f7e50
commit 3f307da258
3 changed files with 10 additions and 33 deletions

View file

@ -90,29 +90,23 @@ class spamfilterModel extends spamfilter
executeQuery('spamfilter.updateDeniedWordHit', $args);
$config = $this->getConfig();
if($config->display_keyword === 'Y')
if($config->custom_message)
{
$custom_message = sprintf(lang('msg_alert_denied_word'), $word);
}
else
{
if($config->custom_message)
if(preg_match('/^\\$user_lang->[a-zA-Z0-9]+$/', $config->custom_message))
{
if(preg_match('/^\\$user_lang->[a-zA-Z0-9]+$/', $config->custom_message))
{
getController('module')->replaceDefinedLangCode($config->custom_message);
$custom_message = htmlspecialchars($config->custom_message);
}
else
{
$custom_message = $config->custom_message;
}
getController('module')->replaceDefinedLangCode($config->custom_message);
$custom_message = htmlspecialchars($config->custom_message);
}
else
{
$custom_message = lang('spamfilter.msg_alert_do_not_display_keyword_denied_word');
$custom_message = $config->custom_message;
}
}
else
{
$custom_message = sprintf(lang('msg_alert_denied_word'), $word);
}
return new Object(-1, $custom_message);
}