Author: Aaron Junker (Aaron-Junker) Committer: Christoph M. Becker (cmb69) Date: 2022-07-07T13:36:15+02:00
Commit: https://github.com/php/web-qa/commit/4496f6477e6d1788ce90914b913f45c7deb409e1 Raw diff: https://github.com/php/web-qa/commit/4496f6477e6d1788ce90914b913f45c7deb409e1.diff Properly set $CURRENT_PAGE and $TITLE Closes GH-36. Changed paths: M build.php M handling-bugs.php M howto_phpt.php M howto_phpunit.php M howtohelp.php M include/functions.php M list_builds.php M pftt.php M projects.php M rc.php M reports/details.php M reports/index.php M reports/run_tests.php M reports/viewreports.php M running-tests.php M write-test.php Diff: diff --git a/build.php b/build.php index cfe4d90..969073c 100644 --- a/build.php +++ b/build.php @@ -12,7 +12,7 @@ $TITLE = htmlentities("PHP: QA: PFTT: $branch: $revision"); $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); -common_header(NULL, $TITLE); +common_header(NULL); echo '<h1><a href="list_builds.php?branch=', urlencode($branch), '">', htmlentities($branch), '</a>', htmlentities($revision), "</h1>\n"; diff --git a/handling-bugs.php b/handling-bugs.php index fa20a38..94986d2 100644 --- a/handling-bugs.php +++ b/handling-bugs.php @@ -4,6 +4,8 @@ $TITLE = "Handling Bug Reports [PHP-QAT: Quality Assurance Team]"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); +$CURRENT_PAGE = "Handling Reports"; + common_header(); ?> <h1>Handling bug reports?</h1> diff --git a/howto_phpt.php b/howto_phpt.php index 96718d2..cd9a725 100644 --- a/howto_phpt.php +++ b/howto_phpt.php @@ -5,7 +5,7 @@ $TITLE = "PHP: QA: PFTT"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); -common_header(NULL, $TITLE); +common_header(NULL); ?> diff --git a/howto_phpunit.php b/howto_phpunit.php index 60fd6c4..173ad6a 100644 --- a/howto_phpunit.php +++ b/howto_phpunit.php @@ -5,7 +5,7 @@ $TITLE = "PHP: QA: PFTT"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); -common_header(NULL, $TITLE); +common_header(NULL); ?> diff --git a/howtohelp.php b/howtohelp.php index c25c1ea..4bda1c1 100644 --- a/howtohelp.php +++ b/howtohelp.php @@ -4,6 +4,8 @@ $TITLE = "How To Help [PHP-QAT: Quality Assurance Team]"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); +$CURRENT_PAGE = "Contributing"; + common_header(); ?> <h1>How You Can Help</h1> diff --git a/include/functions.php b/include/functions.php index 95209a9..eb7fa1f 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3,7 +3,9 @@ (c) 2001 by Marco Kaiser (b...@php.net) and the PHP Group */ -function common_header($extra_headers=NULL, $TITLE = "Quality Assurance") { +function common_header($extra_headers=NULL) { + global $TITLE, $CURRENT_PAGE, $SEARCH; + isset($TITLE) || $TITLE = "Quality Assurance"; if ($extra_headers) { $HEAD_RAND = join("\n", $extra_headers); } diff --git a/list_builds.php b/list_builds.php index bc2c0c8..8ec5824 100644 --- a/list_builds.php +++ b/list_builds.php @@ -8,7 +8,7 @@ $TITLE = "PHP: QA: PFTT: $branch"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); -common_header(NULL, $TITLE); +common_header(NULL); echo '<h1><a href="pftt.php">', htmlentities($branch), "</a></h1>\n"; echo "<p>Choose a PHP revision or build</p>\n"; diff --git a/pftt.php b/pftt.php index 927104a..025d4d2 100644 --- a/pftt.php +++ b/pftt.php @@ -5,7 +5,7 @@ $TITLE = "PHP: QA: PFTT"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); -common_header(NULL, $TITLE); +common_header(NULL); define('BASE_REPORT_DIR', dirname($_SERVER['SCRIPT_FILENAME'])."/reports/db/"); diff --git a/projects.php b/projects.php index 9f7e215..ea5c276 100644 --- a/projects.php +++ b/projects.php @@ -4,6 +4,8 @@ $TITLE = "Projects & Goals [PHP-QAT: Quality Assurance Team]"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); +$CURRENT_PAGE = "Goals"; + common_header(); ?> <h1>PHP-QAT Goals</h1> diff --git a/rc.php b/rc.php index 030055a..a136f3d 100644 --- a/rc.php +++ b/rc.php @@ -4,6 +4,8 @@ $TITLE = "Release Candidates"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); +$CURRENT_PAGE = "What is RC?"; + common_header(); ?> <h1>Release Candidates</h1> diff --git a/reports/details.php b/reports/details.php index 72f8e61..694e1c4 100644 --- a/reports/details.php +++ b/reports/details.php @@ -59,6 +59,7 @@ $database->close(); $TITLE = "Report details"; +$CURRENT_PAGE = "Reports"; common_header(['<meta name="robots" content="noindex">']); ?> <script src="sorttable.js"></script> diff --git a/reports/index.php b/reports/index.php index c376abc..8e68e22 100644 --- a/reports/index.php +++ b/reports/index.php @@ -3,6 +3,8 @@ $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); +$CURRENT_PAGE = "Reports"; + common_header(); ?> diff --git a/reports/run_tests.php b/reports/run_tests.php index b904aff..756620b 100644 --- a/reports/run_tests.php +++ b/reports/run_tests.php @@ -21,6 +21,7 @@ include __DIR__ . '/../include/functions.php'; require __DIR__ . '/reportsfunctions.php'; +$CURRENT_PAGE = "Reports"; common_header(); echo "<script src=\"sorttable.js\"></script>\n"; echo "<div style=\"margin:10px\">\n"; diff --git a/reports/viewreports.php b/reports/viewreports.php index 6cf2cab..dcff753 100644 --- a/reports/viewreports.php +++ b/reports/viewreports.php @@ -74,6 +74,9 @@ $TITLE = "Reports for test ".$testName; + +$CURRENT_PAGE = "Reports"; + common_header(); ?> <script src="sorttable.js"></script> diff --git a/running-tests.php b/running-tests.php index 76c3596..c675bbf 100644 --- a/running-tests.php +++ b/running-tests.php @@ -4,6 +4,7 @@ $TITLE = "Submit Build Test [PHP-QAT: Quality Assurance Team]"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); +$CURRENT_PAGE = "Contributing"; common_header(); ?> diff --git a/write-test.php b/write-test.php index f21c294..b76dee4 100644 --- a/write-test.php +++ b/write-test.php @@ -4,6 +4,7 @@ $TITLE = "Writing Tests [PHP-QAT: Quality Assurance Team]"; $SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__)); +$CURRENT_PAGE = "Contributing"; common_header(); ?> <h1>Creating new test files</h1>