(bug 33246) News icon shown for news:// URLs but not for news: URLs. Patch by Erwin...
[lhc/web/wiklou.git] / redirect.php
index c0e8746..eb15c6b 100644 (file)
@@ -1,23 +1,21 @@
 <?php
-unset( $DP );
-unset( $IP );
-$wgCommandLineMode = false;
-define( 'MEDIAWIKI', true );
-if ( isset( $_REQUEST['GLOBALS'] ) ) {
-       echo '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>';
-       die( -1 );
+
+/**
+ * Script that redirects to the article passed in the "wpDropdown" parameter.
+ * This is used by the nostalgia skin for the special pages drop-down
+ *
+ * @file
+ */
+if ( isset( $_SERVER['MW_COMPILED'] ) ) {
+       require ( 'phase3/includes/WebStart.php' );
+} else {
+       require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
 }
 
-require_once( './includes/Defines.php' );
-require_once( './LocalSettings.php' );
 global $wgArticlePath;
 
-require_once( 'includes/WebRequest.php' );
-$wgRequest = new WebRequest();
-
 $page = $wgRequest->getVal( 'wpDropdown' );
 
 $url = str_replace( "$1", urlencode( $page ), $wgArticlePath );
 
-header( "Location: {$url}" );
-?>
+header( "Location: {$url}", true, 301 );