[web-php] master: Fix ext/oci redirections (#490)
| From: | Máté Kocsis via GitHub | Date: | Sun, 16 Jan 2022 17:42:12 +0000 |
| Subject: | [web-php] master: Fix ext/oci redirections (#490) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-29860@lists.php.net to get a copy of this message | ||
Author: Máté Kocsis (kocsismate)
Committer: GitHub (web-flow)
Pusher: kocsismate
Date: 2022-01-16T18:42:00+01:00
Commit: https://github.com/php/web-php/commit/99479aa988480114ca5e4fe67cb1879bc3dd5356
Raw diff: https://github.com/php/web-php/commit/99479aa988480114ca5e4fe67cb1879bc3dd5356.diff
Fix ext/oci redirections (#490)
Changed paths:
M error.php
Diff:
diff --git a/error.php b/error.php
index 8b97cb516..449bb0811 100644
--- a/error.php
+++ b/error.php
@@ -245,8 +245,18 @@
// Refactored
'regexp.reference' => 'regexp.introduction',
+);
+
+if (isset($manual_page_moves[$URI])) {
+ status_header(301);
+ mirror_redirect("/" . $manual_page_moves[$URI]);
+} elseif (preg_match("!^manual/([^/]+)/([^/]+).php$!", $URI, $match) &&
+ isset($manual_page_moves[$match[2]])) {
+ status_header(301);
+ mirror_redirect("/manual/$match[1]/" . $manual_page_moves[$match[2]] .
".php");
+}
- // Renamed classes and methods
+$manual_redirections = array(
'class.oci-lob' => 'class.ocilob',
'oci-lob.append' => 'ocilob.append',
'oci-lob.close' => 'ocilob.close',
@@ -279,13 +289,9 @@
'oci-collection.trim' => 'ocicollection.trim',
);
-if (isset($manual_page_moves[$URI])) {
- status_header(301);
- mirror_redirect("/" . $manual_page_moves[$URI]);
-} elseif (preg_match("!^manual/([^/]+)/([^/]+).php$!", $URI, $match) &&
- isset($manual_page_moves[$match[2]])) {
+if (preg_match("!^manual/([^/]+)/([^/]+)$!", $URI, $match) &&
isset($manual_redirections[$match[2]])) {
status_header(301);
- mirror_redirect("/manual/$match[1]/" . $manual_page_moves[$match[2]] .
".php");
+ mirror_redirect("/manual/$match[1]/" . $manual_redirections[$match[2]]);
}
// ============================================================================