mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
issue 46 apply validator to spamfilter module
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8553 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
84bd81ab40
commit
60d7f6fb84
11 changed files with 91 additions and 23 deletions
|
|
@ -23,6 +23,11 @@
|
|||
// Create and insert the module Controller object
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('spamfilter',$args);
|
||||
if($output->toBool() && !in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminConfig');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -42,7 +47,13 @@
|
|||
**/
|
||||
function procSpamfilterAdminDeleteDeniedIP() {
|
||||
$ipaddress = Context::get('ipaddress');
|
||||
return $this->deleteIP($ipaddress);
|
||||
$output = $this->deleteIP($ipaddress);
|
||||
if($output->toBool() && !in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminDeniedIPList');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -50,7 +61,13 @@
|
|||
**/
|
||||
function procSpamfilterAdminInsertDeniedWord() {
|
||||
$word = Context::get('word');
|
||||
return $this->insertWord($word);
|
||||
$output = $this->insertWord($word);
|
||||
if($output->toBool() && !in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminDeniedWordList');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -58,7 +75,13 @@
|
|||
**/
|
||||
function procSpamfilterAdminDeleteDeniedWord() {
|
||||
$word = base64_decode(Context::get('word'));
|
||||
return $this->deleteWord($word);
|
||||
$output = $this->deleteWord($word);
|
||||
if($output->toBool() && !in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminDeniedWordList');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue