r114112 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114111‎ | r114112 | r114113 >
Date:21:01, 18 March 2012
Author:robin
Status:ok (Comments)
Tags:
Comment:
When it's an unrecognised project (wikimedia.org domain), redirect to a default Meta page instead of any useless Incubator page. See bug 33809. (I'll create the Meta page when this is marked ok.)
Modified paths:
  • /trunk/tools/web-scripts/missing.php (modified) (history)

Diff [purge]

Index: trunk/tools/web-scripts/missing.php
@@ -85,7 +85,7 @@
8686 }
8787
8888 $project = strtolower( $project );
89 -$projectcode = $projects[$project];
 89+$projectcode = isset( $projects[$project] ) ? $projects[$project] : null;
9090 $project = ucfirst( $project ); // for 404 pages message
9191
9292 $location = $url['scheme'] . '://' . $base . 'W' . $projectcode . '/' . urlencode( $language );
@@ -94,6 +94,11 @@
9595 $location .= $page && $page !== '/' ? '/' . $page :
9696 '?goto=mainpage' . ( isset( $_GET['uselang'] ) ? '&uselang=' . urlencode( $_GET['uselang'] ) : '' );
9797
 98+# Not recognised (probably a wikimedia.org domain) -> redirect to a Meta page
 99+if( !$projectcode ) {
 100+ $location = $url['scheme'] . '://meta.wikimedia.org/wiki/Missing_wiki';
 101+}
 102+
98103 $redir = false;
99104
100105 switch( $projectcode ) {

Comments

#Comment by SPQRobin (talk | contribs)   21:19, 18 March 2012

I'm tagging this with 1.19wmf1, for deployment, although it's independent from the MediaWiki checkout.

Status & tagging log