r72358 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72357‎ | r72358 | r72359 >
Date:08:32, 4 September 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Rename ResourceLoader to something else now that someone else come up with the same cool name ;)
Modified paths:
  • /trunk/extensions/Translate/MessageChecks.php (modified) (history)
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)
  • /trunk/extensions/Translate/_autoload.php (modified) (history)
  • /trunk/extensions/Translate/utils/ResourceLoader.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/MessageChecks.php
@@ -53,7 +53,7 @@
5454 public function __construct( MessageGroup $group ) {
5555 if ( self::$globalBlacklist === null ) {
5656 $file = dirname( __FILE__ ) . '/check-blacklist.php';
57 - $list = ResourceLoader::loadVariableFromPHPFile( $file, 'checkBlacklist' );
 57+ $list = PHPVariableLoader::loadVariableFromPHPFile( $file, 'checkBlacklist' );
5858 $keys = array( 'group', 'check', 'subcheck', 'code', 'message' );
5959
6060 foreach ( $list as $key => $pattern ) {
Index: trunk/extensions/Translate/MessageGroups.php
@@ -330,7 +330,7 @@
331331 $file = $this->getMessageFileWithPath( $code );
332332 // Can return null, convert to array.
333333 $messages = (array) $this->mangler->mangle(
334 - ResourceLoader::loadVariableFromPHPFile( $file, 'messages' )
 334+ PHPVariableLoader::loadVariableFromPHPFile( $file, 'messages' )
335335 );
336336
337337 if ( $this->parentId ) {
Index: trunk/extensions/Translate/_autoload.php
@@ -92,7 +92,7 @@
9393 * @name Various utilities
9494 * @{
9595 */
96 -$wgAutoloadClasses['ResourceLoader'] = $dir . 'utils/ResourceLoader.php';
 96+$wgAutoloadClasses['PHPVariableLoader'] = $dir . 'utils/ResourceLoader.php';
9797 $wgAutoloadClasses['StringMangler'] = $dir . 'utils/StringMatcher.php';
9898 $wgAutoloadClasses['StringMatcher'] = $dir . 'utils/StringMatcher.php';
9999 $wgAutoloadClasses['FCFontFinder'] = $dir . 'utils/Font.php';
Index: trunk/extensions/Translate/utils/ResourceLoader.php
@@ -10,7 +10,7 @@
1111 /**
1212 * Stuff for handling configuration files in PHP format.
1313 */
14 -class ResourceLoader {
 14+class PHPVariableLoader {
1515 /**
1616 * Returns a global variable from PHP file by executing the file.
1717 * @param $_filename \string Path to the file.

Status & tagging log