diff --git a/docs/templates.md b/docs/templates.md index 0623d91e..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') ?> ``` @@ -51,15 +51,17 @@ The `templates/layout.php`: - - PHP Bug Tracking System :: <?= $title ?? '' ?> + PHP :: <?= $this->e($title) ?> + + + block('main_content') ?>
- + block('scripts') ?> @@ -121,7 +123,7 @@ The `templates/pages/index.php`: extends('layout.php'); ?> start('scripts'); ?> - + end('scripts'); ?> start('content') ?> @@ -138,7 +140,7 @@ The `templates/forms/form.php`: append('scripts'); ?> - + end('scripts'); ?> ``` @@ -153,8 +155,8 @@ The final rendered page: - - + + ``` 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 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'; } diff --git a/templates/layout.php b/templates/layout.php index a0eb35f5..5de278d3 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.
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

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

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') ?> 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.
  • diff --git a/templates/pages/index.php b/templates/pages/index.php index dedb98b0..50ef2779 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') ?> diff --git a/templates/pages/search_how_to.php b/templates/pages/search_how_to.php index 4bf76fab..9e1adef2 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 @@ -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') ?> diff --git a/www/index.php b/www/index.php index a1461a72..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]); } @@ -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 );