X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=redirect.php;h=92a8890932799f76bd00f28387cb2b4b5f829dd2;hb=6dffd12c87dcf1ce13ac0d077be8882378b87278;hp=8694e8151c57d1d876ec9d40126bd0100a4928fc;hpb=f4a62d9646631d569a7dcee0c6061d43d7025f37;p=lhc%2Fweb%2Fwiklou.git diff --git a/redirect.php b/redirect.php index 8694e8151c..92a8890932 100644 --- a/redirect.php +++ b/redirect.php @@ -2,16 +2,18 @@ unset( $DP ); unset( $IP ); $wgCommandLineMode = false; +define( 'MEDIAWIKI', true ); -include_once( "./LocalSettings.php" ); +require_once( './includes/Defines.php' ); +require_once( './LocalSettings.php' ); global $wgArticlePath; -include_once( "WebRequest.php" ); +require_once( 'includes/WebRequest.php' ); $wgRequest = new WebRequest(); -$page = $wgRequest->getVal( "wpDropdown" ); +$page = $wgRequest->getVal( 'wpDropdown' ); -$url = str_replace( "$1", $page, $wgArticlePath ); +$url = str_replace( "$1", urlencode( $page ), $wgArticlePath ); header( "Location: {$url}" ); ?>