HTMLForm: throw a warning when no callback is set
[mediawiki.git] / redirect.php
blobeb15c6b96eb6e3fa07d9666d3f8666f3c1b574c2
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}", true, 301 );