From afa365b44b3c52dd2c4162cdcf4869a8745bdfda Mon Sep 17 00:00:00 2001 From: ovclas Date: Mon, 10 Oct 2011 07:06:08 +0000 Subject: [PATCH] issue 314 remove error_return_url in getUrl function git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9525 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- config/func.inc.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/config/func.inc.php b/config/func.inc.php index 6bd06971f..c89f6017c 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -219,21 +219,23 @@ * 3. URL made of args_list added to RequestUri if the first argument value is ''. **/ function getUrl() { - $num_args = func_num_args(); + $num_args = func_num_args(); $args_list = func_get_args(); - if(!$num_args) return Context::getRequestUri(); + if($num_args) $url = Context::getUrl($num_args, $args_list); + else $url = Context::getRequestUri(); - return Context::getUrl($num_args, $args_list); + return preg_replace('@\berror_return_url=[^&]*|\w+=(?:&|$)@', '', $url); } function getNotEncodedUrl() { $num_args = func_num_args(); $args_list = func_get_args(); - if(!$num_args) return Context::getRequestUri(); + if($num_args) $url = Context::getUrl($num_args, $args_list, null, false); + else $url = Context::getRequestUri(); - return Context::getUrl($num_args, $args_list, null, false); + return preg_replace('@\berror_return_url=[^&]*|\w+=(?:&|$)@', '', $url); } /**