Fixes needed to make redirect.php work with MEDIAWIKI checks,
authorJens Frank <jeluf@users.mediawiki.org>
Sun, 3 Oct 2004 09:53:39 +0000 (09:53 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Sun, 3 Oct 2004 09:53:39 +0000 (09:53 +0000)
i18n and without explicitely set include_path

includes/WebRequest.php
redirect.php

index 271d41d..3204346 100644 (file)
@@ -115,7 +115,9 @@ class WebRequest {
                                strncmp($wgServer, $_SERVER['HTTP_REFERER'], strlen( $wgServer ) ) ) ) {
                                # For links that came from outside, check for alternate/legacy
                                # character encoding.
-                               $data = $wgContLang->checkTitleEncoding( $data );
+                               if ( isset( $wgContLang ) ) {
+                                       $data = $wgContLang->checkTitleEncoding( $data );
+                               }
                        }
                        if( !$wgUseLatin1 ) {
                                require_once( 'normal/UtfNormal.php' );
index 6b69aee..2f50814 100644 (file)
@@ -2,11 +2,12 @@
 unset( $DP );
 unset( $IP );
 $wgCommandLineMode = false;
+define( "MEDIAWIKI", true );
 
 require_once( "./LocalSettings.php" );
 global $wgArticlePath;
 
-require_once( "WebRequest.php" );
+require_once( "includes/WebRequest.php" );
 $wgRequest = new WebRequest();
 
 $page = $wgRequest->getVal( "wpDropdown" );