mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 21:29:58 +09:00
issue 46 Validator apply install module.
viewing error message debug git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8506 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
077e931a2e
commit
b4f4afcc17
25 changed files with 237 additions and 41 deletions
|
|
@ -98,7 +98,7 @@ class HTMLDisplayHandler {
|
|||
$keys = array_keys($INPUT_ERROR);
|
||||
$keys = '('.implode('|', $keys).')';
|
||||
|
||||
$output = preg_replace('/(<input[^>]*?)(?:value="[^"]*"([^>]*?name="'.$keys.'"[^>])|(name="'.$keys.'"[^>]*?)value="[^"]*")([^>]*?\/?>)/ise', '"\\1\\2\\4 value=\\"".htmlspecialchars($INPUT_ERROR["\\3\\5"])."\\" \\6"', $output);
|
||||
$output = preg_replace('/(<input[^>]*?)(?:value="[^"]*"([^>]*?name="'.$keys.'"[^>])|(name="'.$keys.'"[^>]*?)(?:value="[^"]*")?)([^>]*?\/?>)/ise', '"\\1\\2\\4 value=\\"".htmlspecialchars($INPUT_ERROR["\\3\\5"])."\\" \\6"', $output);
|
||||
}
|
||||
|
||||
if(__DEBUG__==3) $GLOBALS['__trans_content_elapsed__'] = getMicroTime()-$start;
|
||||
|
|
|
|||
|
|
@ -335,16 +335,16 @@
|
|||
// execute the action, and if failed, set error
|
||||
if(!$oModule->proc())
|
||||
{
|
||||
$this->error = $oModule->getMessage();
|
||||
// case post, redirect page
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
|
||||
{
|
||||
$this->_setInputValueToSession();
|
||||
$returnUrl = Context::get('error_return_url')?Context::get('error_return_url'):getUrl();
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
|
||||
$_SESSION['XE_VALIDATOR_ERROR'] = $oModule->getMessage();
|
||||
$_SESSION['XE_VALIDATOR_ERROR_RETURN_URL'] = $returnUrl;
|
||||
$this->_setInputValueToSession();
|
||||
}
|
||||
// case exec xml, return xml response
|
||||
else $this->error = $oModule->getMessage();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -237,7 +237,8 @@
|
|||
}
|
||||
|
||||
// return url generate
|
||||
$matches[2] = '<input type="hidden" name="error_return_url" value="{getRequestUriByServerEnviroment()}" />'.$matches[2];
|
||||
preg_match('/<input[^>]*name="error_return_url"[^>]*>/is', $matches[2], $m3);
|
||||
if(!$m3[0]) $matches[2] = '<input type="hidden" name="error_return_url" value="{getRequestUriByServerEnviroment()}" />'.$matches[2];
|
||||
|
||||
$matches[0] = '';
|
||||
return implode($matches);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue