Commit: 924473e538938e057984264c845c65e16f56f433 Author: Hannes Magnusson <[email protected]> Thu, 21 Nov 2013 09:29:29 -0800 Parents: 2133a81fd043775929d3e9a0054325ed9abf6ec5 Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=924473e538938e057984264c845c65e16f56f433 Log: Remove the filename from BASE_HREF (used for <base />), fixes bug#66138 Bugs: https://bugs.php.net/66138 Changed paths: M include/shared-manual.inc M include/site.inc Diff: diff --git a/include/shared-manual.inc b/include/shared-manual.inc index 1a78b01..c44d6de 100644 --- a/include/shared-manual.inc +++ b/include/shared-manual.inc @@ -335,8 +335,9 @@ function manual_setup($setup) { global $PGI, $MYSITE; $PGI = $setup; // Set base href for this manual page - $_SERVER['BASE_PAGE'] = 'manual/' . language_convert($setup['head'][1]) . "/" . $setup['this'][0]; - $_SERVER['BASE_HREF'] = $MYSITE . $_SERVER['BASE_PAGE']; + $dirname = 'manual/' . language_convert($setup['head'][1]); + $_SERVER['BASE_PAGE'] = $dirname . "/" . $setup['this'][0]; + $_SERVER['BASE_HREF'] = $MYSITE . $dirname . "/"; $siblings = array(); diff --git a/include/site.inc b/include/site.inc index c930534..3137fc8 100644 --- a/include/site.inc +++ b/include/site.inc @@ -553,6 +553,7 @@ if (isset($_SERVER['MIRROR_STATS'])) { // Provide base href information to make relative links on // shortcut URL accessed pages work without redirection if (isset($_SERVER['BASE_PAGE'])) { - $_SERVER['BASE_HREF'] = $MYSITE . $_SERVER['BASE_PAGE']; + $dirname = dirname($_SERVER['BASE_PAGE']); + $_SERVER['BASE_HREF'] = $MYSITE . $dirname . "/"; } else { unset($_SERVER['BASE_HREF']); } -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
