From 1ac282d4c11064808bab8440772af37e1ea7b3af Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 14 Dec 2012 16:06:36 -0800 Subject: [PATCH] Use $IP instead of relative paths. Change-Id: Ic49ed466d3974c1640378831f0db61fda89f4e9e --- includes/LocalisationCache.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.20.1