Index: trunk/phase3/languages/Language.php |
— | — | @@ -2396,6 +2396,12 @@ |
2397 | 2397 | $cache = compact( self::$mLocalisationKeys ); |
2398 | 2398 | wfDebug( "Language::loadLocalisation(): got localisation for $code from source\n" ); |
2399 | 2399 | } |
| 2400 | + |
| 2401 | + # Load magic word source file |
| 2402 | + global $IP; |
| 2403 | + $filename = "$IP/includes/MagicWord.php"; |
| 2404 | + $newDeps = array( $filename => filemtime( $filename ) ); |
| 2405 | + $deps = array_merge( $deps, $newDeps ); |
2400 | 2406 | |
2401 | 2407 | if ( !empty( $fallback ) ) { |
2402 | 2408 | # Load the fallback localisation, with a circular reference guard |
— | — | @@ -2472,6 +2478,10 @@ |
2473 | 2479 | self::loadLocalisation( $cache ); |
2474 | 2480 | $cache = self::$mLocalisationCache[$cache]; |
2475 | 2481 | } |
| 2482 | + // At least one language file and the MagicWord file needed |
| 2483 | + if( count($cache['deps']) < 2 ) { |
| 2484 | + return true; |
| 2485 | + } |
2476 | 2486 | $expired = false; |
2477 | 2487 | foreach ( $cache['deps'] as $file => $mtime ) { |
2478 | 2488 | if ( !file_exists( $file ) || filemtime( $file ) > $mtime ) { |