From ceacda960c25402bdcd1e675e5c4258656e0ba1d Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 22 Feb 2011 22:21:59 +0000 Subject: feature 2197 added: if make_index_url() adds no parameters after index.php?, then we return get_absolute_root_url() git-svn-id: http://piwigo.org/svn/trunk@9353 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_url.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index ee7ac1443..a192d21cf 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -134,8 +134,17 @@ function make_index_url($params = array()) { $url .= '?'; } + + $url_before_params = $url; + $url.= make_section_in_url($params); $url = add_well_known_params_in_url($url, $params); + + if ($url == $url_before_params) + { + $url = get_absolute_root_url(); + } + return $url; } -- cgit v1.2.3