From: Tim Starling Date: Sun, 15 May 2011 13:36:59 +0000 (+0000) Subject: Fix for HipHop breakage in r87748 etc. Please do not use require_once(dirname(__FILE_... X-Git-Tag: 1.31.0-rc.0~30151 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=69f2c2edee285d16ab8ac03c92ca91f79fd8a25b;p=lhc%2Fweb%2Fwiklou.git Fix for HipHop breakage in r87748 etc. Please do not use require_once(dirname(__FILE__)...) to fetch class, function or define() dependencies anymore. You do not need to have HipHop to know that doing so will break it. --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index f00ef395c4..bc4a824965 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -8,10 +8,6 @@ if ( !defined( 'MEDIAWIKI' ) ) { die( "This file is part of MediaWiki, it is not a valid entry point" ); } -if ( !defined( 'MW_COMPILED' ) ) { - require_once( dirname( __FILE__ ) . '/normal/UtfNormalUtil.php' ); -} - // Hide compatibility functions from Doxygen /// @cond diff --git a/includes/Setup.php b/includes/Setup.php index 3ca8b2c099..706155a2a9 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -326,6 +326,7 @@ if ( !defined( 'MW_COMPILED' ) ) { wfProfileOut( $fname . '-exception' ); wfProfileIn( $fname . '-includes' ); + require_once( "$IP/includes/normal/UtfNormalUtil.php" ); require_once( "$IP/includes/GlobalFunctions.php" ); require_once( "$IP/includes/Hooks.php" ); require_once( "$IP/includes/ProxyTools.php" ); diff --git a/includes/normal/Utf8CaseGenerate.php b/includes/normal/Utf8CaseGenerate.php index 8dbff1dbd4..368d0bcdff 100644 --- a/includes/normal/Utf8CaseGenerate.php +++ b/includes/normal/Utf8CaseGenerate.php @@ -29,6 +29,7 @@ if( php_sapi_name() != 'cli' ) { die( "Run me from the command line please.\n" ); } +require_once 'UtfNormalDefines.php'; require_once 'UtfNormalUtil.php'; $in = fopen("UnicodeData.txt", "rt" ); diff --git a/includes/normal/Utf8Test.php b/includes/normal/Utf8Test.php index 53108bc4d0..6eae6e7275 100644 --- a/includes/normal/Utf8Test.php +++ b/includes/normal/Utf8Test.php @@ -26,6 +26,8 @@ */ /** */ + +require_once 'UtfNormalDefines.php'; require_once 'UtfNormalUtil.php'; require_once 'UtfNormal.php'; mb_internal_encoding( "utf-8" ); diff --git a/includes/normal/UtfNormal.php b/includes/normal/UtfNormal.php index 46682ca042..919278c985 100644 --- a/includes/normal/UtfNormal.php +++ b/includes/normal/UtfNormal.php @@ -28,8 +28,6 @@ * @defgroup UtfNormal UtfNormal */ -require_once dirname(__FILE__).'/UtfNormalUtil.php'; - /** * For using the ICU wrapper */ diff --git a/includes/normal/UtfNormalBench.php b/includes/normal/UtfNormalBench.php index 2229dbb4b1..944c443530 100644 --- a/includes/normal/UtfNormalBench.php +++ b/includes/normal/UtfNormalBench.php @@ -28,6 +28,7 @@ if( isset( $_SERVER['argv'] ) && in_array( '--icu', $_SERVER['argv'] ) ) { dl( 'php_utfnormal.so' ); } +require_once 'UtfNormalDefines.php'; require_once 'UtfNormalUtil.php'; require_once 'UtfNormal.php'; diff --git a/includes/normal/UtfNormalGenerate.php b/includes/normal/UtfNormalGenerate.php index a5e2885ae8..e4c1138ea3 100644 --- a/includes/normal/UtfNormalGenerate.php +++ b/includes/normal/UtfNormalGenerate.php @@ -29,6 +29,7 @@ if( php_sapi_name() != 'cli' ) { die( "Run me from the command line please.\n" ); } +require_once 'UtfNormalDefines.php'; require_once 'UtfNormalUtil.php'; $in = fopen("DerivedNormalizationProps.txt", "rt" ); diff --git a/includes/normal/UtfNormalMemStress.php b/includes/normal/UtfNormalMemStress.php index 3f7f1e1bd2..1277dc20e0 100644 --- a/includes/normal/UtfNormalMemStress.php +++ b/includes/normal/UtfNormalMemStress.php @@ -30,6 +30,7 @@ if( isset( $_SERVER['argv'] ) && in_array( '--icu', $_SERVER['argv'] ) ) { dl( 'php_utfnormal.so' ); } +require_once 'UtfNormalDefines.php'; require_once 'UtfNormalUtil.php'; require_once 'UtfNormal.php'; diff --git a/includes/normal/UtfNormalTest.php b/includes/normal/UtfNormalTest.php index f78775ceeb..e5ae7f7246 100644 --- a/includes/normal/UtfNormalTest.php +++ b/includes/normal/UtfNormalTest.php @@ -49,6 +49,7 @@ if( isset( $_SERVER['argv'] ) && in_array( '--icu', $_SERVER['argv'] ) ) { dl( 'php_utfnormal.so' ); } +require_once 'UtfNormalDefines.php'; require_once 'UtfNormalUtil.php'; require_once 'UtfNormal.php'; diff --git a/includes/normal/UtfNormalUtil.php b/includes/normal/UtfNormalUtil.php index f2b12d4eed..bfad709553 100644 --- a/includes/normal/UtfNormalUtil.php +++ b/includes/normal/UtfNormalUtil.php @@ -25,9 +25,6 @@ * @ingroup UtfNormal */ -/** */ -require_once dirname(__FILE__).'/UtfNormalDefines.php'; - /** * Return UTF-8 sequence for a given Unicode code point. * May die if fed out of range data.