aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_url.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-02-22 22:21:59 +0000
committerplegall <plg@piwigo.org>2011-02-22 22:21:59 +0000
commitceacda960c25402bdcd1e675e5c4258656e0ba1d (patch)
treefd5a87791f038d6515869d1bb1df2851853a4dba /include/functions_url.inc.php
parent78f7e1f96cab7eaaf141ca4e3a2cd1cd7b68b8b0 (diff)
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
Diffstat (limited to '')
-rw-r--r--include/functions_url.inc.php9
1 files changed, 9 insertions, 0 deletions
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;
}