From: <jon...@us...> - 2012-02-06 23:26:49
|
Revision: 39764 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=39764&view=rev Author: jonnybradley Date: 2012-02-06 23:26:43 +0000 (Mon, 06 Feb 2012) Log Message: ----------- [FIX] base href: Again - always use the script name & query as the various URI will be the pre-rewritten request (which may contain /s) Modified Paths: -------------- trunk/lib/setup/absolute_urls.php Modified: trunk/lib/setup/absolute_urls.php =================================================================== --- trunk/lib/setup/absolute_urls.php 2012-02-06 22:51:06 UTC (rev 39763) +++ trunk/lib/setup/absolute_urls.php 2012-02-06 23:26:43 UTC (rev 39764) @@ -46,14 +46,10 @@ $base_url_http = 'http://'.$url_host.(($prefs['http_port']!='')?':'.$prefs['http_port']:'').$url_path; $base_url_https = 'https://'.$url_host.(($prefs['https_port']!='')?':'.$prefs['https_port']:'').$url_path; // for <base> tag, which needs the " absolute URI that acts as the base URI for resolving relative URIs", not just the root of the site -if (!empty($_SERVER['REDIRECT_SCRIPT_URI'])) { - $base_uri = $_SERVER['REDIRECT_SCRIPT_URI']; -} else if (!empty($_SERVER['SCRIPT_URI'])) { - $base_uri = $_SERVER['SCRIPT_URI']; -} else if (!empty($_SERVER['SCRIPT_NAME'])) { +if (!empty($_SERVER['SCRIPT_NAME'])) { $base_uri = $base_host . $_SERVER['SCRIPT_NAME']; if (!empty($_SERVER['QUERY_STRING'])) { - $base_uri .= '?' . $_SERVER['QUERY_STRING']; + $base_uri .= '?' . str_replace('?', '&',$_SERVER['QUERY_STRING']); } } else if (!empty($_SERVER['REQUEST_URI'])) { $base_uri = $base_host . $_SERVER['REQUEST_URI']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |