Fix a regression from 1.17: Show date/times in user preference timezone.
[lhc/web/wiklou.git] / redirect.php
index 11d3c10..eb15c6b 100644 (file)
@@ -1,6 +1,21 @@
 <?php
-include_once( "./LocalSettings.php" );
-global $wpDropdown, $wgArticlePath;
-$url = str_replace( "$1", $wpDropdown, $wgArticlePath );
-header( "Location: {$url}" );
-?>
+
+/**
+ * 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' );
+}
+
+global $wgArticlePath;
+
+$page = $wgRequest->getVal( 'wpDropdown' );
+
+$url = str_replace( "$1", urlencode( $page ), $wgArticlePath );
+
+header( "Location: {$url}", true, 301 );