From: Aaron Schulz Date: Sat, 15 Dec 2012 00:06:36 +0000 (-0800) Subject: Use $IP instead of relative paths. X-Git-Tag: 1.31.0-rc.0~21295 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=1ac282d4c11064808bab8440772af37e1ea7b3af;p=lhc%2Fweb%2Fwiklou.git Use $IP instead of relative paths. Change-Id: Ic49ed466d3974c1640378831f0db61fda89f4e9e --- diff --git a/includes/LocalisationCache.php b/includes/LocalisationCache.php index 01c8f76404..7cc1b9c13b 100644 --- a/includes/LocalisationCache.php +++ b/includes/LocalisationCache.php @@ -566,6 +566,8 @@ class LocalisationCache { * exists, the data array is returned, otherwise false is returned. */ protected function readSourceFilesAndRegisterDeps( $code, &$deps ) { + global $IP; + $fileName = Language::getMessagesFileName( $code ); if ( !file_exists( $fileName ) ) { return false; @@ -579,8 +581,9 @@ class LocalisationCache { # And for PHP $data['compiledPluralRules'] = $this->getCompiledPluralRules( $code ); - $deps['plurals'] = new FileDependency( __DIR__ . "/../languages/data/plurals.xml" ); - $deps['plurals-mw'] = new FileDependency( __DIR__ . "/../languages/data/plurals-mediawiki.xml" ); + $deps['plurals'] = new FileDependency( "$IP/languages/data/plurals.xml" ); + $deps['plurals-mw'] = new FileDependency( "$IP/languages/data/plurals-mediawiki.xml" ); + return $data; }