jenkins-bot has submitted this change and it was merged.
Change subject: Condense 404 handling regexes
......................................................................
Condense 404 handling regexes
Change-Id: I150523a284a43e6241a6e0a3bda88e10dfb20dbd
---
M w/404.php
1 file changed, 1 insertion(+), 5 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/w/404.php b/w/404.php
index 0c080c2..b5e0e14 100644
--- a/w/404.php
+++ b/w/404.php
@@ -13,11 +13,7 @@
header( "Cache-Control: s-maxage=2678400, max-age=2678400");
header( "X-Wikimedia-Debug: prot=$prot serv=$serv loc=$loc");
if( preg_match( "|(%2f)|i", $loc, $matches )
- || preg_match( "|^/upload/(.*)|i",$loc, $matches )
- || preg_match("|^/style/(.*)|i",$loc, $matches )
- || preg_match( "|^/wiki/(.*)|i",$loc, $matches )
- || preg_match("|^/w/(.*)|i",$loc, $matches )
- || preg_match( "|^/extensions/(.*)|i",$loc, $matches )
+ || preg_match( "|^/(?:upload|style|wiki|w|extensions)/(.*)|i", $loc,
$matches )
) {
$title = htmlspecialchars( $matches[1] );
$details = "<p style=\"font-weight: bold;\">To check for \"$title\"
see: <a href=\"//$serv/wiki/$title\"
title=\"$title\">$prot$serv/wiki/$title</a></p>";
--
To view, visit https://gerrit.wikimedia.org/r/186392
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I150523a284a43e6241a6e0a3bda88e10dfb20dbd
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits