mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 19:51:42 +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
|
|
@ -279,6 +279,12 @@
|
|||
// Insert by creating the module Controller object
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('document',$config);
|
||||
|
||||
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', 'dispDocumentAdminConfig');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -446,20 +452,27 @@
|
|||
$query = "document.updateAlias";
|
||||
}
|
||||
$output = executeQuery($query, $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
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', 'dispDocumentAdminAlias', 'document_srl', $args->document_srl);
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
function procDocumentAdminDeleteAlias() {
|
||||
$alias_srl = Context::get('alias_srl');
|
||||
$document_srl = Context::get('document_srl');
|
||||
$alias_srl = Context::get('target_srl');
|
||||
$args->alias_srl = $alias_srl;
|
||||
$output = executeQuery("document.deleteAlias", $args);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
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', 'dispDocumentAdminAlias', 'document_srl', $document_srl);
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
function procDocumentAdminRestoreTrash() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue