mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-10 05:52:13 +09:00
issue 46 validator apply to module module.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8536 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7cdc29c313
commit
4763de6248
8 changed files with 68 additions and 30 deletions
|
|
@ -22,27 +22,41 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage("success_registed");
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminCategory');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update category
|
||||
**/
|
||||
function procModuleAdminUpdateCategory() {
|
||||
$mode = Context::get('mode');
|
||||
|
||||
switch($mode) {
|
||||
case 'delete' :
|
||||
$output = $this->doDeleteModuleCategory();
|
||||
$msg_code = 'success_deleted';
|
||||
break;
|
||||
case 'update' :
|
||||
$output = $this->doUpdateModuleCategory();
|
||||
$msg_code = 'success_updated';
|
||||
break;
|
||||
}
|
||||
$output = $this->doUpdateModuleCategory();
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage($msg_code);
|
||||
$this->setMessage('success_updated');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminCategory');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Delete category
|
||||
**/
|
||||
function procModuleAdminDeleteCategory() {
|
||||
$output = $this->doDeleteModuleCategory();
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminCategory');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue