1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Fix ext/oci redirections (#490)

This commit is contained in:
Máté Kocsis
2022-01-16 18:42:00 +01:00
committed by GitHub
parent fa955451b2
commit 99479aa988

View File

@@ -245,8 +245,18 @@ $manual_page_moves = array(
// Refactored
'regexp.reference' => 'regexp.introduction',
);
// Renamed classes and methods
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");
}
$manual_redirections = array(
'class.oci-lob' => 'class.ocilob',
'oci-lob.append' => 'ocilob.append',
'oci-lob.close' => 'ocilob.close',
@@ -279,13 +289,9 @@ $manual_page_moves = array(
'oci-collection.trim' => 'ocicollection.trim',
);
if (isset($manual_page_moves[$URI])) {
if (preg_match("!^manual/([^/]+)/([^/]+)$!", $URI, $match) && isset($manual_redirections[$match[2]])) {
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");
mirror_redirect("/manual/$match[1]/" . $manual_redirections[$match[2]]);
}
// ============================================================================