mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
issue 46 apply validator to trash module
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8561 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ab0e63b954
commit
0bf52edba1
4 changed files with 20 additions and 5 deletions
|
|
@ -39,7 +39,9 @@ class trashAdminController extends trash
|
|||
{
|
||||
global $lang;
|
||||
$isAll = Context::get('is_all');
|
||||
$trashSrls = explode('|@|', Context::get('trash_srls'));
|
||||
$tmpTrashSrls = Context::get('trash_srls');
|
||||
if(is_array($tmpTrashSrls)) $trashSrls = $tmpTrashSrls;
|
||||
else $trashSrls = explode('|@|', $tmpTrashSrls);
|
||||
|
||||
$oTrashModel = &getModel('trash');
|
||||
if($isAll == 'true')
|
||||
|
|
@ -73,6 +75,11 @@ class trashAdminController extends trash
|
|||
if(!$this->_emptyTrash($trashSrls))
|
||||
return new Object(-1, $lang->fail_empty);
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispTrashAdminList');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return new Object(0, $lang->success_empty);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue