mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +09:00
issue 46 file, communication module ruleset not committed.
comment Validator not committed. threfore this source commit git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8507 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b4f4afcc17
commit
6cd7c0e5ad
12 changed files with 101 additions and 11 deletions
|
|
@ -332,16 +332,21 @@
|
|||
Context::addHtmlFooter($footer);
|
||||
}
|
||||
|
||||
// execute the action, and if failed, set error
|
||||
if(!$oModule->proc())
|
||||
// if failed message exists in session, set context
|
||||
$this->_setInputErrorToContext();
|
||||
|
||||
$procResult = $oModule->proc();
|
||||
//if(!$oModule->proc())
|
||||
if(!$procResult)
|
||||
{
|
||||
$this->error = $oModule->getMessage();
|
||||
// case post, redirect page
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
|
||||
{
|
||||
$returnUrl = Context::get('error_return_url')?Context::get('error_return_url'):getUrl();
|
||||
$errorMsg = $oModule->getMessage() ? $oModule->getMessage() : 'module process error';
|
||||
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = $oModule->getMessage();
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = $errorMsg;
|
||||
$_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] = $returnUrl;
|
||||
$this->_setInputValueToSession();
|
||||
}
|
||||
|
|
@ -354,10 +359,18 @@
|
|||
$_SESSION['INPUT_ERROR'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $oModule;
|
||||
}
|
||||
|
||||
function _setInputErrorToContext()
|
||||
{
|
||||
if($_SESSION['XE_VALIDATOR_ERROR'] && !Context::get('XE_VALIDATOR_ERROR')) Context::set('XE_VALIDATOR_ERROR', $_SESSION['XE_VALIDATOR_ERROR']);
|
||||
if($_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] && !Context::get('XE_VALIDATOR_ERROR_RETURN_URL')) Context::set('XE_VALIDATOR_ERROR_RETURN_URL', $_SESSION['XE_VALIDATOR_ERROR_RETURN_URL']);
|
||||
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = '';
|
||||
$_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] = '';
|
||||
}
|
||||
|
||||
function _setInputValueToSession()
|
||||
{
|
||||
$requestVars = Context::getRequestVars();
|
||||
|
|
@ -459,15 +472,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
if($_SESSION['XE_VALIDATOR_ERROR'] && !Context::get('XE_VALIDATOR_ERROR')) Context::set('XE_VALIDATOR_ERROR', $_SESSION['XE_VALIDATOR_ERROR']);
|
||||
if($_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] && !Context::get('XE_VALIDATOR_ERROR_RETURN_URL')) Context::set('XE_VALIDATOR_ERROR_RETURN_URL', $_SESSION['XE_VALIDATOR_ERROR_RETURN_URL']);
|
||||
|
||||
// Display contents
|
||||
$oDisplayHandler = new DisplayHandler();
|
||||
$oDisplayHandler->printContent($oModule);
|
||||
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = '';
|
||||
$_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] = '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue