mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-13 23:42:13 +09:00
issue 46 apply server side validator in document module
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8498 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e129e7c227
commit
8791643bb1
12 changed files with 83 additions and 27 deletions
|
|
@ -1055,7 +1055,10 @@ class documentController extends document {
|
|||
**/
|
||||
function procDocumentInsertCategory($args = null) {
|
||||
// List variables
|
||||
if(!$args) $args = Context::gets('module_srl','category_srl','parent_srl','title','description','expand','group_srls','color','mid');
|
||||
if(!$args) $args = Context::gets('module_srl','category_srl','parent_srl','category_title','category_description','expand','group_srls','category_color','mid');
|
||||
$args->title = $args->category_title;
|
||||
$args->description = $args->category_description;
|
||||
$args->color = $args->category_color;
|
||||
|
||||
if(!$args->module_srl && $args->mid){
|
||||
$mid = $args->mid;
|
||||
|
|
@ -1070,7 +1073,8 @@ class documentController extends document {
|
|||
if(!$grant->manager) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
if($args->expand !="Y") $args->expand = "N";
|
||||
$args->group_srls = str_replace('|@|',',',$args->group_srls);
|
||||
if(!is_array($args->group_srls)) $args->group_srls = str_replace('|@|',',',$args->group_srls);
|
||||
else $args->group_srls = implode(',', $args->group_srls);
|
||||
$args->parent_srl = (int)$args->parent_srl;
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
|
@ -1106,6 +1110,12 @@ class documentController extends document {
|
|||
$this->add('module_srl', $args->module_srl);
|
||||
$this->add('category_srl', $args->category_srl);
|
||||
$this->add('parent_srl', $args->parent_srl);
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispBoardAdminCategoryInfo', 'module_srl', $args->module_srl);
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue