(follow-up r91436) add new hook to hooks.txt
[mediawiki.git] / redirect.php
blobc0a1602155398ae6a0f54a1b34a3ee78d1d1e216
1 <?php
3 /**
4 * Script that redirects to the article passed in the "wpDropdown" parameter.
5 * This is used by the nostalgia skin for the special pages drop-down
7 * @file
8 */
9 if ( isset( $_SERVER['MW_COMPILED'] ) ) {
10 require ( 'phase3/includes/WebStart.php' );
11 } else {
12 require ( dirname( __FILE__ ) . '/includes/WebStart.php' );
15 global $wgArticlePath;
17 $page = $wgRequest->getVal( 'wpDropdown' );
19 $url = str_replace( "$1", urlencode( $page ), $wgArticlePath );
21 header( "Location: {$url}" );