cvs: phpweb /include shared-manual.inc
| From: | Gabor Hojtsy | Date: | Mon, 21 Apr 2003 19:27:16 +0000 |
| Subject: | cvs: phpweb /include shared-manual.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-16861@lists.php.net to get a copy of this message | ||
goba Mon Apr 21 15:27:16 2003 EDT
Modified files:
/phpweb/include shared-manual.inc
Log:
Applying a better solution for the problem,
preconfiguring page details in the already
existing page configuration array, and using
the information from there in the new XSL
sheets => results in slightly smaller PHP files
Index: phpweb/include/shared-manual.inc
diff -u phpweb/include/shared-manual.inc:1.174 phpweb/include/shared-manual.inc:1.175
--- phpweb/include/shared-manual.inc:1.174 Mon Apr 21 15:10:03 2003
+++ phpweb/include/shared-manual.inc Mon Apr 21 15:27:16 2003
@@ -2,7 +2,7 @@
require_once 'prepend.inc';
// Set variable defaults
-$NEXT = $PREV = $UP = $HOME = array(false, false);
+$NEXT = $PREV = $UP = $HOME = $PGI = array(false, false);
$TOC = array(); $SIDEBAR_DATA = '';
// If we don't know anything about printing, set it to false
@@ -11,13 +11,14 @@
// Set up variables containing navigational information
// for this page and page part of the manual
function setupNavigation($data) {
- global $NEXT, $PREV, $UP, $HOME, $TOC, $tstamp;
+ global $NEXT, $PREV, $UP, $HOME, $TOC, $PGI, $tstamp;
$HOME = @$data["home"];
$HOME[0] = "./";
$NEXT = @$data["next"];
$PREV = @$data["prev"];
$UP = @$data["up"];
- $TOC = @$data["toc"];
+ $TOC = @$data["toc"];
+ $PGI = @$data["this"];
$tstamp = gmdate("D, d M Y",getlastmod());
}
@@ -272,16 +273,15 @@
// Print out manual page header.
function manualHeader()
{
- global $PRINT_PAGE;
+ global $PRINT_PAGE, $PGI;
- // XSL sheets provide params in [id, title]
- // order, while old DSSSL sheets provide them
- // in [title, id] order
- $args = func_get_args();
- if (strpos($args[0], ".php") > 0) {
- $id = $args[0]; $title = $args[1];
+ // XSL sheets provide params in the 'this' array
+ // element configured above, while old DSSSL sheets
+ // provide info via two parameters [title, id]
+ if (func_num_args() > 0) {
+ list($title, $id) = func_get_args();
} else {
- $title = $args[0]; $id = $args[1];
+ list($id, $title) = $PGI;
}
if ($PRINT_PAGE) {
@@ -297,16 +297,15 @@
// Print out manual footer
function manualFooter()
{
- global $PRINT_PAGE, $PRINT_NOTES;
+ global $PRINT_PAGE, $PRINT_NOTES, $PGI;
- // XSL sheets provide params in [id, title]
- // order, while old DSSSL sheets provide them
- // in [title, id] order
- $args = func_get_args();
- if (strpos($args[0], ".php") > 0) {
- $id = $args[0]; $title = $args[1];
+ // XSL sheets provide params in the 'this' array
+ // element configured above, while old DSSSL sheets
+ // provide info via two parameters [title, id]
+ if (func_num_args() > 0) {
+ list($title, $id) = func_get_args();
} else {
- $title = $args[0]; $id = $args[1];
+ list($id, $title) = $PGI;
}
if ($PRINT_PAGE) {