http://www.mediawiki.org/wiki/Special:Code/MediaWiki/54867
Revision: 54867 Author: siebrand Date: 2009-08-12 15:22:10 +0000 (Wed, 12 Aug 2009) Log Message: ----------- * remove use of obsolete wfLoadExtensionMessages * use new style magic words (none implemented at the moment) Modified Paths: -------------- trunk/extensions/WikiAtHome/NonFreeVideoHandler.php trunk/extensions/WikiAtHome/SpecialWikiAtHome.php trunk/extensions/WikiAtHome/WikiAtHome.i18n.php trunk/extensions/WikiAtHome/WikiAtHome.php Added Paths: ----------- trunk/extensions/WikiAtHome/WikiAtHome.i18n.magic.php Modified: trunk/extensions/WikiAtHome/NonFreeVideoHandler.php =================================================================== --- trunk/extensions/WikiAtHome/NonFreeVideoHandler.php 2009-08-12 15:09:02 UTC (rev 54866) +++ trunk/extensions/WikiAtHome/NonFreeVideoHandler.php 2009-08-12 15:22:10 UTC (rev 54867) @@ -6,19 +6,11 @@ class NonFreeVideoHandler extends MediaHandler { const METADATA_VERSION = 22; - static $magicDone = false; - function isEnabled() { return true; } - static function registerMagicWords( &$magicData, $code ) { - wfLoadExtensionMessages( 'WikiAtHome' ); - return true; - } - function getParamMap() { - wfLoadExtensionMessages( 'WikiAtHome' ); /*return array( 'img_width' => 'width', 'ogg_noplayer' => 'noplayer', @@ -240,7 +232,6 @@ } function getShortDesc( $file ) { global $wgLang; - wfLoadExtensionMessages( 'WikiAtHome' ); $metadata = $this->unpackMetadata( $file->getMetadata() ); $streamTypes = $this->getStreamTypes( $file ); if ( !$streamTypes ) { @@ -260,7 +251,6 @@ function getLongDesc( $file ) { global $wgLang; - wfLoadExtensionMessages( 'WikiAtHome' ); $metadata = $this->unpackMetadata( $file->getMetadata() ); $streamTypes = $this->getStreamTypes( $file ); if ( !$streamTypes ) { @@ -297,7 +287,6 @@ function getDimensionsString( $file ) { global $wgLang; - wfLoadExtensionMessages( 'WikiAtHome' ); if ( $file->getWidth() ) { return wfMsg( 'video-dims', $wgLang->formatTimePeriod( $this->getLength( $file ) ), $wgLang->formatNum( $file->getWidth() ), @@ -321,7 +310,6 @@ function toHtml( $options = array() ) { global $wgJobTypeConfig; - wfLoadExtensionMessages( 'WikiAtHome' ); if( $this->percDone == -1){ $waitHtml = wfMsgWikiHtml( 'wah-transcode-fail'); }else{ Modified: trunk/extensions/WikiAtHome/SpecialWikiAtHome.php =================================================================== --- trunk/extensions/WikiAtHome/SpecialWikiAtHome.php 2009-08-12 15:09:02 UTC (rev 54866) +++ trunk/extensions/WikiAtHome/SpecialWikiAtHome.php 2009-08-12 15:22:10 UTC (rev 54867) @@ -5,7 +5,6 @@ class SpecialWikiAtHome extends SpecialPage { public function __construct() { parent::__construct( 'SpecialWikiAtHome' ); - wfLoadExtensionMessages( 'WikiAtHome' ); if ( method_exists( 'SpecialPage', 'setGroup' ) ) { parent::setGroup( 'SpecialWikiAtHome', 'media' ); Added: trunk/extensions/WikiAtHome/WikiAtHome.i18n.magic.php =================================================================== --- trunk/extensions/WikiAtHome/WikiAtHome.i18n.magic.php (rev 0) +++ trunk/extensions/WikiAtHome/WikiAtHome.i18n.magic.php 2009-08-12 15:22:10 UTC (rev 54867) @@ -0,0 +1,6 @@ +<?php + +$magicWords = array(); + +$magicWords['en'] = array( +); Property changes on: trunk/extensions/WikiAtHome/WikiAtHome.i18n.magic.php ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Modified: trunk/extensions/WikiAtHome/WikiAtHome.i18n.php =================================================================== --- trunk/extensions/WikiAtHome/WikiAtHome.i18n.php 2009-08-12 15:09:02 UTC (rev 54866) +++ trunk/extensions/WikiAtHome/WikiAtHome.i18n.php 2009-08-12 15:22:10 UTC (rev 54867) @@ -5,6 +5,8 @@ * @addtogroup Extensions */ +require_once( dirname(__FILE__) . '/WikiAtHome.i18n.magic.php' ); + $messages = array(); /** English Modified: trunk/extensions/WikiAtHome/WikiAtHome.php =================================================================== --- trunk/extensions/WikiAtHome/WikiAtHome.php 2009-08-12 15:09:02 UTC (rev 54866) +++ trunk/extensions/WikiAtHome/WikiAtHome.php 2009-08-12 15:22:10 UTC (rev 54867) @@ -29,7 +29,6 @@ $wgExtensionMessagesFiles['WikiAtHome'] = "$exDir/WikiAtHome.i18n.php"; $wgExtensionAliasesFiles['WikiAtHome'] = "$exDir/WikiAtHome.alias.php"; -$wgHooks['LanguageGetMagic'][] = 'NonFreeVideoHandler::registerMagicWords'; //special pages $wgAutoloadClasses['SpecialWikiAtHome'] = "$exDir/SpecialWikiAtHome.php"; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs