com web/php: Its enough to set the BASE_PAGE once: incl ude/shared-manual.inc
| From: | Hannes Magnusson | Date: | Wed, 04 Feb 2015 17:58:58 +0000 |
| Subject: | com web/php: Its enough to set the BASE_PAGE once: incl ude/shared-manual.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-20651@lists.php.net to get a copy of this message | ||
Commit: 61919c6478e578f3911c66ba8f1fa239d08eebb9
Author: Hannes Magnusson <bjori@mongodb.com> Wed, 4 Feb 2015 09:58:58 -0800
Parents: cc342a1f423ff0c8683205c95cbee8fb255f0f75
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=61919c6478e578f3911c66ba8f1fa239d08eebb9
Log:
Its enough to set the BASE_PAGE once
Changed paths:
M include/shared-manual.inc
Diff:
diff --git a/include/shared-manual.inc b/include/shared-manual.inc
index 43cbb24..98e357f 100644
--- a/include/shared-manual.inc
+++ b/include/shared-manual.inc
@@ -375,7 +375,8 @@ function manual_setup($setup) {
$PGI = $setup;
// Set base href for this manual page
- $_SERVER['BASE_PAGE'] = 'manual/' .
language_convert($setup['head'][1]) . "/" . $setup['this'][0];
+ $base = 'manual/' . language_convert($setup['head'][1]) . "/";
+ $_SERVER['BASE_PAGE'] = $base . $setup['this'][0];
$_SERVER['BASE_HREF'] = $MYSITE . $_SERVER['BASE_PAGE'];
// Load user note for this page
@@ -389,8 +390,6 @@ function manual_setup($setup) {
$note = current($USERNOTES);
$lastusernote = $note["xwhen"];
- $base = "manual/" . $setup["head"][1] . "/";
- $_SERVER["BASE_PAGE"] = $base . $setup["this"][0];
$timestamps = array(
filemtime($_SERVER["DOCUMENT_ROOT"] . "/" .
$_SERVER["BASE_PAGE"]),
filemtime($_SERVER["DOCUMENT_ROOT"] . "/include/prepend.inc"),