Skip to content

Commit 4496f64

Browse files
Aaron-Junkercmb69
authored andcommitted
Properly set $CURRENT_PAGE and $TITLE
Closes GH-36.
1 parent 3fcde4a commit 4496f64

16 files changed

+25
-6
lines changed

build.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
$TITLE = htmlentities("PHP: QA: PFTT: $branch: $revision");
1313
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
1414

15-
common_header(NULL, $TITLE);
15+
common_header(NULL);
1616

1717
echo '<h1><a href="list_builds.php?branch=', urlencode($branch), '">',
1818
htmlentities($branch), '</a>', htmlentities($revision), "</h1>\n";

handling-bugs.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
$TITLE = "Handling Bug Reports [PHP-QAT: Quality Assurance Team]";
55
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
66

7+
$CURRENT_PAGE = "Handling Reports";
8+
79
common_header();
810
?>
911
<h1>Handling bug reports?</h1>

howto_phpt.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$TITLE = "PHP: QA: PFTT";
66
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
77

8-
common_header(NULL, $TITLE);
8+
common_header(NULL);
99

1010
?>
1111

howto_phpunit.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$TITLE = "PHP: QA: PFTT";
66
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
77

8-
common_header(NULL, $TITLE);
8+
common_header(NULL);
99

1010
?>
1111

howtohelp.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
$TITLE = "How To Help [PHP-QAT: Quality Assurance Team]";
55
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
66

7+
$CURRENT_PAGE = "Contributing";
8+
79
common_header();
810
?>
911
<h1>How You Can Help</h1>

include/functions.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
(c) 2001 by Marco Kaiser ([email protected]) and the PHP Group
44
*/
55

6-
function common_header($extra_headers=NULL, $TITLE = "Quality Assurance") {
6+
function common_header($extra_headers=NULL) {
7+
global $TITLE, $CURRENT_PAGE, $SEARCH;
8+
isset($TITLE) || $TITLE = "Quality Assurance";
79
if ($extra_headers) {
810
$HEAD_RAND = join("\n", $extra_headers);
911
}

list_builds.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
$TITLE = "PHP: QA: PFTT: $branch";
99
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
1010

11-
common_header(NULL, $TITLE);
11+
common_header(NULL);
1212

1313
echo '<h1><a href="pftt.php">', htmlentities($branch), "</a></h1>\n";
1414
echo "<p>Choose a PHP revision or build</p>\n";

pftt.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$TITLE = "PHP: QA: PFTT";
66
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
77

8-
common_header(NULL, $TITLE);
8+
common_header(NULL);
99

1010
define('BASE_REPORT_DIR', dirname($_SERVER['SCRIPT_FILENAME'])."/reports/db/");
1111

projects.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
$TITLE = "Projects &amp; Goals [PHP-QAT: Quality Assurance Team]";
55
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
66

7+
$CURRENT_PAGE = "Goals";
8+
79
common_header();
810
?>
911
<h1>PHP-QAT Goals</h1>

rc.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
$TITLE = "Release Candidates";
55
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
66

7+
$CURRENT_PAGE = "What is RC?";
8+
79
common_header();
810
?>
911
<h1>Release Candidates</h1>

reports/details.php

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
$database->close();
6060

6161
$TITLE = "Report details";
62+
$CURRENT_PAGE = "Reports";
6263
common_header(['<meta name="robots" content="noindex">']);
6364
?>
6465
<script src="sorttable.js"></script>

reports/index.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
55

6+
$CURRENT_PAGE = "Reports";
7+
68
common_header();
79

810
?>

reports/run_tests.php

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
include __DIR__ . '/../include/functions.php';
2222
require __DIR__ . '/reportsfunctions.php';
2323

24+
$CURRENT_PAGE = "Reports";
2425
common_header();
2526
echo "<script src=\"sorttable.js\"></script>\n";
2627
echo "<div style=\"margin:10px\">\n";

reports/viewreports.php

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474

7575

7676
$TITLE = "Reports for test ".$testName;
77+
78+
$CURRENT_PAGE = "Reports";
79+
7780
common_header();
7881
?>
7982
<script src="sorttable.js"></script>

running-tests.php

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
$TITLE = "Submit Build Test [PHP-QAT: Quality Assurance Team]";
55
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
66

7+
$CURRENT_PAGE = "Contributing";
78
common_header();
89
?>
910

write-test.php

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
$TITLE = "Writing Tests [PHP-QAT: Quality Assurance Team]";
55
$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
66

7+
$CURRENT_PAGE = "Contributing";
78
common_header();
89
?>
910
<h1>Creating new test files</h1>

0 commit comments

Comments
 (0)