Wikia code/includes/LocalisationCache.php
< Wikia code | includes
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. The information shown below refers to the now unmaintained 1.16 MediaWiki release. The current stable release number is 1.42.1. |
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\LocalisationCache.php 2011-07-18 22:31:28.047851600 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\LocalisationCache.php 2011-08-17 15:28:46.411132800 +0100
@@ -402,6 +402,10 @@
protected function readPHPFile( $_fileName, $_fileType ) {
// Disable APC caching
$_apcEnabled = ini_set( 'apc.cache_by_default', '0' );
+ // wikia changes begin
+ //* default empty for wikia i18n files */
+ $messages = array();
+ // wikia changes end
include( $_fileName );
ini_set( 'apc.cache_by_default', $_apcEnabled );
@@ -484,12 +488,23 @@
# Load the primary localisation from the source file
$fileName = Language::getMessagesFileName( $code );
+ $addFileName = Language::getAdditionalMessagesFileName( $code, 'core' );
if ( !file_exists( $fileName ) ) {
wfDebug( __METHOD__.": no localisation file for $code, using fallback to en\n" );
$coreData['fallback'] = 'en';
} else {
$deps[] = new FileDependency( $fileName );
$data = $this->readPHPFile( $fileName, 'core' );
+ // wikia changes begin
+ if ( file_exists( $addFileName ) ) {
+ $deps[] = new FileDependency( $addFileName );
+ $addData = $this->readPHPFile( $addFileName, 'core' );
+
+ if(!empty($addData['messages'])) {
+ $data['messages'] = $data['messages'] + $addData['messages'];
+ }
+ }
+ // wikia changes end
wfDebug( __METHOD__.": got localisation for $code from source\n" );
# Merge primary localisation