Forgot to add this message.
[lhc/web/wiklou.git] / redirect.php
index 11d3c10..4718600 100644 (file)
@@ -1,6 +1,14 @@
 <?php
-include_once( "./LocalSettings.php" );
-global $wpDropdown, $wgArticlePath;
-$url = str_replace( "$1", $wpDropdown, $wgArticlePath );
+define( 'MW_NO_SETUP', 1 );
+require_once( './includes/WebStart.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}" );
 ?>