From f240eabb08211b3e94d4505decdf26f421dfa263 Mon Sep 17 00:00:00 2001 From: Anna Filina Date: Fri, 18 Dec 2020 11:20:45 -0500 Subject: [PATCH 1/3] Parse page id even when .php is missing --- include/errors.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/errors.inc b/include/errors.inc index 4bd9855662..d72963ae33 100644 --- a/include/errors.inc +++ b/include/errors.inc @@ -524,7 +524,7 @@ function get_legacy_manual_urls(string $uri): array $filename = $_SERVER["DOCUMENT_ROOT"] . "/manual/legacyurls.json"; $pages_ids = json_decode(file_get_contents($filename), true); $page_id = preg_replace_callback('/^manual\/.*\/(.*?)(\.php)?$/', function (array $matches): string { - if (count($matches) !== 3) { + if (count($matches) < 2) { return ''; } return $matches[1] ; From 77e2d7ed838e782f5c4d1e6aad20f09741eed58d Mon Sep 17 00:00:00 2001 From: Anna Filina Date: Fri, 18 Dec 2020 12:17:55 -0500 Subject: [PATCH 2/3] Add link to hosted legacy docs --- manual/php4.php | 38 +++++++++++++++++++++++++------------- manual/php5.php | 32 ++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 23 deletions(-) diff --git a/manual/php4.php b/manual/php4.php index 9b3ab46b25..f5a357e908 100644 --- a/manual/php4.php +++ b/manual/php4.php @@ -7,32 +7,44 @@

Documentation for PHP 4

Introduction

-

- The PHP 4 documentation was removed from the PHP Manual in August 2014, - approximately six years after PHP 4 reached its end of life. However, we have - provided downloadable copies of the manual for anyone who would need it. -

+

+ The PHP 4 documentation was removed from the PHP Manual in August 2014, + approximately six years after PHP 4 reached its end of life. However, we have + provided downloadable copies of the manual for anyone who would need it, as well + as a link to a hosted third-party version. +

PHP 4 Manual

- An attempt has been made to preserve as much documentation related to PHP 4, as + An attempt has been made to preserve as much documentation related to PHP 4 as possible. Despite this, we don't have a nice, separate manual covering only PHP 4. - The reason for this is how our documentation is structured. Even so, the archived copy - describes more aspects of PHP 4 than actual manual described in August 2014 (e.g. + The reason for this is how our documentation is structured. Even so, the linked copies + describe more aspects of PHP 4 than the actual manual described in August 2014 (e.g. it covers more PHP 4 extensions).

+ +

- To download a copy of the manual for PHP 4, see the - documentation archives. Please, remember, that archived version should not - be used in everyday development, unless you are developing PHP 4 applications. - This version lacks many topics connected with newer PHP versions and it is not updated anymore. + Please remember that these documentation versions should not + be used in everyday development, unless you are maintaining PHP 4 applications. + These versions lacks many topics connected with newer PHP versions and are not updated anymore.

Migrating to supported PHP version

All users are strongly encouraged to upgrade their environments to newest PHP version. - Please, read our guides for Migrating + Please read our guides for Migrating from PHP 4 to PHP 5.0.x for more information.

diff --git a/manual/php5.php b/manual/php5.php index 4752416af2..5649c7691d 100644 --- a/manual/php5.php +++ b/manual/php5.php @@ -10,29 +10,41 @@

The PHP 5 documentation was removed from the PHP Manual in September 2020, approximately two years after PHP 5 reached its end of life. However, we have - provided downloadable copies of the manual for anyone who would need it. + provided downloadable copies of the manual for anyone who would need it, as well + as a link to a hosted third-party version.

PHP 5 Manual

- An attempt has been made to preserve as much documentation related to PHP 5, as + An attempt has been made to preserve as much documentation related to PHP 5 as possible. Despite this, we don't have a nice, separate manual covering only PHP 5. - The reason for this is how our documentation is structured. Even so, the archived copy - describes more aspects of PHP 5 than actual manual described in September 2020 (e.g. + The reason for this is how our documentation is structured. Even so, the linked copies + describe more aspects of PHP 5 than the actual manual described in September 2020 (e.g. it covers more PHP 5 extensions).

+ +

- To download a copy of the manual for PHP 5, see the - documentation archives. Please, remember, that archived version should not - be used in everyday development, unless you are developing PHP 5 applications. - This version lacks many topics connected with newer PHP versions and it is not updated anymore. + Please remember that these documentation versions should not + be used in everyday development, unless you are maintaining PHP 5 applications. + These versions lacks many topics connected with newer PHP versions and are not updated anymore.

Migrating to supported PHP version

- All users are strongly encouraged to upgrade their environments to newest PHP version. - Please, read our guides for Migrating + All users are strongly encouraged to upgrade their environments to newest PHP version. + Please read our guides for Migrating from PHP 5.6 to PHP 7.0 for more information.

From 7f540efcfd290be3ba5a7359df0efb673217c63e Mon Sep 17 00:00:00 2001 From: Anna Filina Date: Fri, 18 Dec 2020 12:20:10 -0500 Subject: [PATCH 3/3] Revert to original whitespaces --- manual/php4.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manual/php4.php b/manual/php4.php index f5a357e908..bdd8e81a35 100644 --- a/manual/php4.php +++ b/manual/php4.php @@ -7,12 +7,12 @@

Documentation for PHP 4

Introduction

-

- The PHP 4 documentation was removed from the PHP Manual in August 2014, - approximately six years after PHP 4 reached its end of life. However, we have - provided downloadable copies of the manual for anyone who would need it, as well - as a link to a hosted third-party version. -

+

+ The PHP 4 documentation was removed from the PHP Manual in August 2014, + approximately six years after PHP 4 reached its end of life. However, we have + provided downloadable copies of the manual for anyone who would need it, as well + as a link to a hosted third-party version. +

PHP 4 Manual