r109517 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109516‎ | r109517 | r109518 >
Date:10:44, 19 January 2012
Author:siebrand
Status:ok
Tags:backcompat, languagegetmagic 
Comment:
Remove use of deprecated LanguageGetMagic hook.
Modified paths:
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler.i18n.magic.php (added) (history)
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler.php (modified) (history)
  • /trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler.i18n.magic.php
@@ -0,0 +1,21 @@
 2+<?php
 3+/**
 4+ * Internationalization file for extension.
 5+ *
 6+ * Add the "lossy"-parameter to image link.
 7+ * Usage:
 8+ * lossy=true|false
 9+ * lossy=1|0
 10+ * lossy=lossy|lossless
 11+ * E.g. [[Image:Test.tif|lossy=1]]
 12+ *
 13+ * @file
 14+ * @ingroup Extensions
 15+ */
 16+
 17+$magicWords = array();
 18+
 19+/** English (English) */
 20+$magicWords['en'] = array(
 21+ 'img_lossy' => array( 0, "lossy=$1" ),
 22+);
Property changes on: trunk/extensions/PagedTiffHandler/PagedTiffHandler.i18n.magic.php
___________________________________________________________________
Added: svn:eol-style
123 + native
Added: svn:keywords
224 + Id
Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler_body.php
@@ -21,19 +21,6 @@
2222 */
2323
2424 class PagedTiffHandler extends ImageHandler {
25 - /**
26 - * Add the "lossy"-parameter to image link.
27 - * Usage:
28 - * lossy=true|false
29 - * lossy=1|0
30 - * lossy=lossy|lossless
31 - * E.g. [[Image:Test.tif|lossy=1]]
32 - */
33 - static function addTiffLossyMagicWordLang( &$magicWords, $langCode ) {
34 - $magicWords['img_lossy'] = array( 0, "lossy=$1" );
35 - return true;
36 - }
37 -
3825 function isEnabled() {
3926 return true;
4027 }
Index: trunk/extensions/PagedTiffHandler/PagedTiffHandler.php
@@ -113,13 +113,13 @@
114114
115115 $dir = dirname( __FILE__ ) . '/';
116116 $wgExtensionMessagesFiles['PagedTiffHandler'] = $dir . 'PagedTiffHandler.i18n.php';
 117+$wgExtensionMessagesFiles['PagedTiffHandlerMagic'] = $dir . 'PagedTiffHandler.i18n.magic.php';
117118 $wgAutoloadClasses['PagedTiffImage'] = $dir . 'PagedTiffHandler.image.php';
118119 $wgAutoloadClasses['PagedTiffHandler'] = $dir . 'PagedTiffHandler_body.php';
119120 $wgAutoloadClasses['TiffReader'] = $dir . 'TiffReader.php';
120121 $wgAutoloadClasses['PagedTiffHandlerSeleniumTestSuite'] = $dir . 'selenium/PagedTiffHandlerTestSuite.php';
121122
122123 $wgMediaHandlers['image/tiff'] = 'PagedTiffHandler';
123 -$wgHooks['LanguageGetMagic'][] = 'PagedTiffHandler::addTiffLossyMagicWordLang';
124124
125125 define('TIFF_METADATA_VERSION', '1.4');
126126 # 1.0: initial

Status & tagging log