issue 767, added processing about 'no-error-return-url' attr. in form element.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9784 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-10-28 09:12:49 +00:00
parent 5cdc46d4e3
commit ef059ba669

View file

@ -245,8 +245,11 @@ class TemplateHandler {
}
// return url generate
preg_match('/<input[^>]*name="error_return_url"[^>]*>/is', $matches[2], $m3);
if(!$m3[0]) $matches[2] = '<input type="hidden" name="error_return_url" value="<?php echo getRequestUriByServerEnviroment() ?>" />'.$matches[2];
if (!preg_match('/no-error-return-url="true"/i', $matches[1]))
{
preg_match('/<input[^>]*name="error_return_url"[^>]*>/is', $matches[2], $m3);
if(!$m3[0]) $matches[2] = '<input type="hidden" name="error_return_url" value="<?php echo getRequestUriByServerEnviroment() ?>" />'.$matches[2];
}
$matches[0] = '';
return implode($matches);