Fix #1159 Add sort option to spamfilter word list

This commit is contained in:
Kijin Sung 2019-07-27 23:21:35 +09:00
parent 0a9d34c37f
commit 853d6753eb
3 changed files with 13 additions and 6 deletions

View file

@ -39,9 +39,16 @@ class spamfilterAdminView extends spamfilter
*/
function dispSpamfilterAdminDeniedWordList()
{
// Get sort index
$sort_index = Context::get('sort_index');
if (!in_array($sort_index, array('regdate', 'latest_hit', 'hit')))
{
$sort_index = 'hit';
}
// Get the list of denied IP addresses and words
$oSpamFilterModel = getModel('spamfilter');
$word_list = $oSpamFilterModel->getDeniedWordList();
$word_list = $oSpamFilterModel->getDeniedWordList($sort_index);
Context::set('word_list', $word_list);
$security = new Security();