From 4e69ace79542fb38f15f4d4c4b67f282041bd059 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 12:50:09 +0200 Subject: [PATCH 01/18] make it installable in web sub directory using base href tag and converting links from absolute '/' to using the base href. --- templates/layout.php | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/templates/layout.php b/templates/layout.php index a0eb35f5..5fa9514b 100644 --- a/templates/layout.php +++ b/templates/layout.php @@ -3,45 +3,46 @@ PHP :: <?= $this->e($title) ?> + - + @@ -64,7 +65,7 @@
php.net |  support |  documentation |  - report a bug |  - advanced search |  - search howto |  - statistics |  - random bug |  + report a bug |  + advanced search |  + search howto |  + statistics |  + random bug |  - my bugs |  + my bugs |  - admin |  + admin |  - logout + logout - login + login
- PHP + PHP Copyright © 2001- The PHP Group
All rights reserved.
From 6a459ee3ba9089ebe3c5f978d7f7a113e04a910e Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:18:26 +0200 Subject: [PATCH 02/18] Update templates.md --- docs/templates.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/templates.md b/docs/templates.md index 0623d91e..94f0654d 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -51,15 +51,17 @@ The `templates/layout.php`: - - PHP Bug Tracking System :: <?= $title ?? '' ?> + PHP :: <?= $this->e($title) ?> + + + block('main_content') ?>
- + block('scripts') ?> @@ -138,7 +140,7 @@ The `templates/forms/form.php`: append('scripts'); ?> - + end('scripts'); ?> ``` @@ -153,8 +155,8 @@ The final rendered page: - - + + ``` From ad291d2958536bbc81069fb513bc15a82d06b9cd Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:19:39 +0200 Subject: [PATCH 03/18] Update index.php --- templates/pages/index.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/templates/pages/index.php b/templates/pages/index.php index dedb98b0..1dfe7326 100644 --- a/templates/pages/index.php +++ b/templates/pages/index.php @@ -9,7 +9,7 @@
  • - Used the form above or our advanced search page + Used the form above or our advanced search page to make sure nobody has reported the bug already.
  • @@ -19,7 +19,7 @@
  • - Read our tips on how to report a bug that + Read our tips on how to report a bug that someone will want to help fix.
  • @@ -30,8 +30,8 @@
  • See how to get a backtrace in case of a crash: - for *NIX and - for Windows. + for *NIX and + for Windows.
  • @@ -42,19 +42,19 @@

    Once you've double-checked that the bug you've found hasn't already been reported, and that you have collected all the information you need to file an -excellent bug report, you can do so on our bug reporting +excellent bug report, you can do so on our bug reporting page.

    Search the Bug System

    You can search all of the bugs that have been reported on our -advanced search page, or use the form at the top of the -page for a basic default search. Read the search howto +advanced search page, or use the form at the top of the +page for a basic default search. Read the search howto for instructions on how search works.

    If you have 10 minutes to kill and you want to help us out, grab a random open bug and see if you can help resolve it. We have made it easy. Hit -random to go directly to a random open bug.

    +random to go directly to a random open bug.

    Common searches

    @@ -67,10 +67,10 @@

    Bug System Statistics

    You can view a variety of statistics about the bugs that have been reported -on our bug statistics page.

    +on our bug statistics page.

    end('content') ?> start('scripts') ?> - + end('scripts') ?> From e2d8b776e61d0bfc3fbd5a405dfa45bbe22e3d6f Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:24:00 +0200 Subject: [PATCH 04/18] Update index.php --- www/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/index.php b/www/index.php index a1461a72..33eae8c7 100644 --- a/www/index.php +++ b/www/index.php @@ -41,7 +41,7 @@ // Prefix query strings with base URL $searches = preg_filter( '/^/', - '/search.php?limit=30&order_by=id&direction=DESC&cmd=display&status=Open', + 'search.php?limit=30&order_by=id&direction=DESC&cmd=display&status=Open', $searches ); From d17526e4aeb74118ab736eb6cc6a7e923af651d5 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:31:18 +0200 Subject: [PATCH 05/18] Update index.php --- templates/pages/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/pages/index.php b/templates/pages/index.php index 1dfe7326..50ef2779 100644 --- a/templates/pages/index.php +++ b/templates/pages/index.php @@ -54,7 +54,7 @@

    If you have 10 minutes to kill and you want to help us out, grab a random open bug and see if you can help resolve it. We have made it easy. Hit -random to go directly to a random open bug.

    +random to go directly to a random open bug.

    Common searches

    From 7ad28221bbacbd4a3b4829cab3a82b41b093c3a8 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:32:36 +0200 Subject: [PATCH 06/18] Update index.php --- www/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/index.php b/www/index.php index 33eae8c7..9914b67f 100644 --- a/www/index.php +++ b/www/index.php @@ -18,7 +18,7 @@ redirect('bug.php?id='.$id); } -if ('/random' === $_SERVER['REQUEST_URI']) { +if ($basedir.'index.php?random' === $_SERVER['REQUEST_URI']) { $id = $container->get(BugRepository::class)->findRandom(); redirect('bug.php?id='.$id[0]); } From b3054ad785ee319ea9c14a45f33dca66eb6f5107 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:33:22 +0200 Subject: [PATCH 07/18] Update layout.php --- templates/layout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/layout.php b/templates/layout.php index 5fa9514b..203afad1 100644 --- a/templates/layout.php +++ b/templates/layout.php @@ -22,7 +22,7 @@ advanced search |  search howto |  statistics |  - random bug |  + random bug |  my bugs |  From 62529dec3edec77614527df683430628951efb8c Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:35:26 +0200 Subject: [PATCH 08/18] Update functions.php --- include/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions.php b/include/functions.php index a2ef5546..5c0e3ae8 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1542,11 +1542,11 @@ function response_header($title, $extraHeaders = '') advanced search |  search howto |  statistics |  - random bug |  + random bug |  my bugs |  - admin |  + admin |  logout From 034cd883fb18ca3d60239fee27b9c0385f552209 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:43:50 +0200 Subject: [PATCH 09/18] Update layout.php --- templates/layout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/layout.php b/templates/layout.php index 203afad1..7ba238e6 100644 --- a/templates/layout.php +++ b/templates/layout.php @@ -11,7 +11,7 @@
    From 12874678fc0d03fda06711e66b36bc291e74d95e Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:44:25 +0200 Subject: [PATCH 10/18] Update menu.php --- templates/pages/admin/menu.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/pages/admin/menu.php b/templates/pages/admin/menu.php index 7d716f7e..0de0dc5e 100644 --- a/templates/pages/admin/menu.php +++ b/templates/pages/admin/menu.php @@ -1,17 +1,17 @@

    - > + > phpinfo() | - > + > Package mailing lists | - > + > Quick fix responses | - > + > Database status

    From 74cb891e0ec843c9479491f5003161209627d597 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:45:16 +0200 Subject: [PATCH 11/18] Update bugs_generating_backtrace.php --- templates/pages/bugs_generating_backtrace.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/pages/bugs_generating_backtrace.php b/templates/pages/bugs_generating_backtrace.php index b99f3831..659e4b61 100644 --- a/templates/pages/bugs_generating_backtrace.php +++ b/templates/pages/bugs_generating_backtrace.php @@ -3,7 +3,7 @@ start('content') ?>

    -Unix | Windows +Unix | Windows

    Generating a gdb backtrace

    From dc624d87f92b924cfb8b5449b8c738e46de0f6a2 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:45:54 +0200 Subject: [PATCH 12/18] Update bugs_generating_backtrace_win32.php --- templates/pages/bugs_generating_backtrace_win32.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/pages/bugs_generating_backtrace_win32.php b/templates/pages/bugs_generating_backtrace_win32.php index 698b8489..142a710b 100644 --- a/templates/pages/bugs_generating_backtrace_win32.php +++ b/templates/pages/bugs_generating_backtrace_win32.php @@ -3,7 +3,7 @@ start('content') ?>

    -Unix | Windows +Unix | Windows

    Generating a backtrace, with a compiler, on Windows

    @@ -70,6 +70,6 @@

    After the analysis has finished, the DebugDiag Analysis Report opens in Internet Explorer; the relevant part of that report is the stack backtrace, which looks similar to the following:

    -

    Debug report backtrace screenshot

    +

    Debug report backtrace screenshot

    end('content') ?> From fbe8e8327285198d3f8f39f42ae6030e60d6b3a2 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:48:55 +0200 Subject: [PATCH 13/18] Update how_to_report.php --- templates/pages/how_to_report.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/pages/how_to_report.php b/templates/pages/how_to_report.php index 0445e9df..37c2cbf7 100644 --- a/templates/pages/how_to_report.php +++ b/templates/pages/how_to_report.php @@ -40,7 +40,7 @@

    Always search the bug database first.

    Advice is so good, we'll repeat it twice. Always search the bug database first. As we said above, there's +href="search.php">search the bug database first. As we said above, there's a lot of users of PHP. The odds are good that if you've found a problem, someone else has found it, too. If you spend a few minutes of your time making sure that you're not filing a duplicate bug, that's a few more minutes someone @@ -77,12 +77,12 @@

  • If PHP is crashing, include a backtrace. Instructions for doing this - can be found here for *NIX users and - here for Windows users. + can be found here for *NIX users and + here for Windows users.
  • Valgrind log can be also very useful. - See instructions how to generate it. + See instructions how to generate it.
  • From 74ee1f774ffaa033e43fc827d9ef58a67315215d Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:50:37 +0200 Subject: [PATCH 14/18] Update templates.md --- docs/templates.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/templates.md b/docs/templates.md index 94f0654d..e5e587a7 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -40,7 +40,7 @@ The `templates/pages/how_to_report.php`: end('main_content') ?> start('scripts') ?> - + end('scripts') ?> ``` @@ -123,7 +123,7 @@ The `templates/pages/index.php`: extends('layout.php'); ?> start('scripts'); ?> - + end('scripts'); ?> start('content') ?> From 948d840b2dbd418492bed8f9b013b8ea9b1afe50 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:53:11 +0200 Subject: [PATCH 15/18] Update search_how_to.php --- templates/pages/search_how_to.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/pages/search_how_to.php b/templates/pages/search_how_to.php index 4bf76fab..5851f5f0 100644 --- a/templates/pages/search_how_to.php +++ b/templates/pages/search_how_to.php @@ -14,7 +14,7 @@

    Basic Search

    -Within every webpage header is a search box, +Within every webpage header is a search box, this is the basic search option. You may enter in a numeric bug ID to redirect to that bugs page or enter in a search term to perform a default bug search. Load the advanced search to view the default values. @@ -23,7 +23,7 @@

    Advanced Search

    -Some explanations for most of the PHP bugs advanced search +Some explanations for most of the PHP bugs advanced search options.

    @@ -75,7 +75,7 @@ requests feedback will be marked as No Feedback if no feedback transpires after 15 days. -
  • Old feedback: Bugs that have been requesting feedback for over60 days.
  • +
  • Old feedback: Bugs that have been requesting feedback for over 60 days.
  • Fresh : Bugs commented on in the last 30 days that are not closed, duplicates, or not-a-bug. Only developers and the original author can affect this From 6a63d72cdb984d200e75354932fd0b61f88e35e2 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 13:53:51 +0200 Subject: [PATCH 16/18] Update search_how_to.php --- templates/pages/search_how_to.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/pages/search_how_to.php b/templates/pages/search_how_to.php index 5851f5f0..9e1adef2 100644 --- a/templates/pages/search_how_to.php +++ b/templates/pages/search_how_to.php @@ -165,7 +165,7 @@

    You can view a variety of statistics about the bugs that have been reported on -our bug statistics page. +our bug statistics page.

    end('content') ?> From 97846b2ddd167c48fd71f0af48eaf07163db0a56 Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 14:02:57 +0200 Subject: [PATCH 17/18] Update prepend.php --- include/prepend.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/prepend.php b/include/prepend.php index 64b99fff..368910e3 100644 --- a/include/prepend.php +++ b/include/prepend.php @@ -50,6 +50,11 @@ define('DEVBOX', false); } +// make sure $site_data['basedir'] ends with / +if (substr($site_data['basedir'], -1) !== '/') { + $site_data['basedir'] .= '/'; +} + if (!isset($site_data['security_email'])) { $site_data['security_email'] = 'security@php.net'; } From 64067b8ebe4d9ae842b1536e41087fc1306ded9f Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 10 Sep 2021 14:10:19 +0200 Subject: [PATCH 18/18] Update layout.php --- templates/layout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/layout.php b/templates/layout.php index 7ba238e6..5de278d3 100644 --- a/templates/layout.php +++ b/templates/layout.php @@ -4,7 +4,7 @@ PHP :: <?= $this->e($title) ?> - +