Index: trunk/extensions/FormatNum/FormatNum.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'formatnum' => array( 0, 'formatnum' ), |
| 12 | +); |
Property changes on: trunk/extensions/FormatNum/FormatNum.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/FormatNum/FormatNum.php |
— | — | @@ -17,17 +17,16 @@ |
18 | 18 | 'url'=>'http://www.mediawiki.org/wiki/Extension:FormatNum', |
19 | 19 | 'descriptionmsg' => 'formatnum-desc', |
20 | 20 | 'author'=>'[http://www.dasch-tour.de DaSch]', |
21 | | - 'version'=>'0.2.0', |
| 21 | + 'version'=>'0.3.0', |
22 | 22 | ); |
23 | 23 | $dir = dirname( __FILE__ ) . '/'; |
24 | 24 | |
25 | 25 | // Internationalization |
26 | 26 | $wgExtensionMessagesFiles['FormatNum'] = $dir . 'FormatNum.i18n.php'; |
| 27 | +$wgExtensionMessagesFiles['FormatNumMagic'] = $dir . 'FormatNum.i18n.magic.php'; |
27 | 28 | |
28 | 29 | # Define a setup function |
29 | 30 | $wgHooks['ParserFirstCallInit'][] = 'efFormatNumParserFunction_Setup'; |
30 | | -# Add a hook to initialise the magic word |
31 | | -$wgHooks['LanguageGetMagic'][] = 'efFormatNumParserFunction_Magic'; |
32 | 31 | |
33 | 32 | function efFormatNumParserFunction_Setup( $parser ) { |
34 | 33 | # Set a function hook associating the "example" magic word with our function |
— | — | @@ -35,15 +34,6 @@ |
36 | 35 | return true; |
37 | 36 | } |
38 | 37 | |
39 | | -function efFormatNumParserFunction_Magic( &$magicWords, $langCode ) { |
40 | | - # Add the magic word |
41 | | - # The first array element is case sensitive, in this case it is not case sensitive |
42 | | - # All remaining elements are synonyms for our parser function |
43 | | - $magicWords['formatnum'] = array( 0, 'formatnum' ); |
44 | | - # unless we return true, other parser functions extensions won't get loaded. |
45 | | - return true; |
46 | | -} |
47 | | - |
48 | 38 | function efFormatNumParserFunction_Render( $parser, $param1 = 0, $param2 = 0, $param3 = '.', $param4 = ',' ) { |
49 | 39 | # The parser function itself |
50 | 40 | # The input parameters are wikitext with templates expanded |
— | — | @@ -61,4 +51,4 @@ |
62 | 52 | break; |
63 | 53 | } |
64 | 54 | return $output; |
65 | | -} |
\ No newline at end of file |
| 55 | +} |
Index: trunk/extensions/FileInfo/FileInfo.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'filesize' => array( 0, 'filesize' ), |
| 12 | +); |
Property changes on: trunk/extensions/FileInfo/FileInfo.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/FileInfo/FileInfo.php |
— | — | @@ -6,26 +6,18 @@ |
7 | 7 | |
8 | 8 | // @todo add other file metadata types via {{#fileinfo:...}} |
9 | 9 | |
| 10 | +$dir = dirname(__FILE__) . '/'; |
| 11 | +$wgExtensionMessagesFiles['FileInfoMagic'] = $dir . 'FileInfo.i18n.magic.php'; |
| 12 | + |
10 | 13 | # Define a setup function |
11 | 14 | $wgExtensionFunctions[] = 'efFilesizeParserFunction_Setup'; |
12 | | -# Add a hook to initialise the magic word |
13 | | -$wgHooks['LanguageGetMagic'][] = 'efFilesizeParserFunction_Magic'; |
14 | | - |
| 15 | + |
15 | 16 | function efFilesizeParserFunction_Setup() { |
16 | 17 | global $wgParser; |
17 | 18 | # Set a function hook associating the "filesize" magic word with our function |
18 | 19 | $wgParser->setFunctionHook( 'filesize', 'efFilesizeParserFunction_Render' ); |
19 | 20 | } |
20 | | - |
21 | | -function efFilesizeParserFunction_Magic( &$magicWords, $langCode ) { |
22 | | - # Add the magic word |
23 | | - # The first array element is case sensitive, in this case it is not case sensitive |
24 | | - # All remaining elements are synonyms for our parser function |
25 | | - $magicWords['filesize'] = array( 0, 'filesize' ); |
26 | | - # unless we return true, other parser functions extensions won't get loaded. |
27 | | - return true; |
28 | | -} |
29 | | - |
| 21 | + |
30 | 22 | function efFilesizeParserFunction_Render( &$parser, $filename = '' ) { |
31 | 23 | # The parser function itself |
32 | 24 | # The input parameters are wikitext with templates expanded |
Index: trunk/extensions/DynamicPageList/DynamicPageList.php |
— | — | @@ -60,11 +60,10 @@ |
61 | 61 | |
62 | 62 | $wgHooks['ParserFirstCallInit'][] = 'ExtDynamicPageList::setupDPL'; |
63 | 63 | |
64 | | -$wgHooks['LanguageGetMagic'][] = 'ExtDynamicPageList__languageGetMagic'; |
65 | | - |
66 | 64 | $wgExtensionMessagesFiles['DynamicPageList'] = dirname( __FILE__ ) . '/DynamicPageList.i18n.php'; |
| 65 | +$wgExtensionMessagesFiles['DynamicPageListMagic'] = dirname( __FILE__ ) . '/DynamicPageList.i18n.magic.php'; |
67 | 66 | |
68 | | -$DPLVersion = '1.8.9'; |
| 67 | +$DPLVersion = '1.9.0'; |
69 | 68 | |
70 | 69 | $wgExtensionCredits['parserhook'][] = array( |
71 | 70 | 'path' => __FILE__, |
Index: trunk/extensions/DynamicPageList/DPLSetup.php |
— | — | @@ -401,10 +401,6 @@ |
402 | 402 | * when making changes here you must update the version field in DynamicPageList.php and DynamicPageListMigration.php ! |
403 | 403 | */ |
404 | 404 | |
405 | | -// changed back to global functions due to trouble with older MW installations, g.s. |
406 | | -function ExtDynamicPageList__languageGetMagic( &$magicWords, $langCode ) { |
407 | | - return ExtDynamicPageList::languageGetMagic( $magicWords, $langCode ); |
408 | | -} |
409 | 405 | function ExtDynamicPageList__endReset( &$parser, $text ) { |
410 | 406 | return ExtDynamicPageList::endReset( $parser, $text ); |
411 | 407 | } |
— | — | @@ -1256,19 +1252,6 @@ |
1257 | 1253 | self::$modulesLoaded = true; |
1258 | 1254 | } |
1259 | 1255 | |
1260 | | - public static function languageGetMagic( &$magicWords, $langCode ) { |
1261 | | - # Add the magic word |
1262 | | - # The first array element is case sensitivity, in this case it is not case sensitive |
1263 | | - # All remaining elements are synonyms for our parser function |
1264 | | - $magicWords['dpl'] = array( 0, 'dpl' ); |
1265 | | - $magicWords['dplnum'] = array( 0, 'dplnum' ); |
1266 | | - $magicWords['dplchapter'] = array( 0, 'dplchapter' ); |
1267 | | - $magicWords['dplmatrix'] = array( 0, 'dplmatrix' ); |
1268 | | - $magicWords['DynamicPageList'] = array( 0, 'DynamicPageList' ); |
1269 | | - # unless we return true, other parser functions extensions won't get loaded. |
1270 | | - return true; |
1271 | | - } |
1272 | | - |
1273 | 1256 | // ------------------------------------------------------------------------------------- ENTRY parser TAG intersection |
1274 | 1257 | public static function intersectionTag( $input, $params, $parser ) { |
1275 | 1258 | self::behaveLikeIntersection( true ); |
Index: trunk/extensions/DynamicPageList/DynamicPageListMigration.php |
— | — | @@ -41,9 +41,9 @@ |
42 | 42 | |
43 | 43 | $wgHooks['ParserFirstCallIntit'][] = 'ExtDynamicPageList::setupMigration'; |
44 | 44 | |
45 | | -$wgHooks['LanguageGetMagic'][] = 'ExtDynamicPageList__languageGetMagic'; |
| 45 | +$wgExtensionMessagesFiles['DynamicPageListMagic'] = dirname( __FILE__ ) . '/DynamicPageList.i18n.magic.php'; |
46 | 46 | |
47 | | -$DPLVersion = '1.8.9'; |
| 47 | +$DPLVersion = '1.9.0'; |
48 | 48 | |
49 | 49 | $wgExtensionCredits['parserhook'][] = array( |
50 | 50 | 'path' => __FILE__, |
Index: trunk/extensions/DynamicPageList/DynamicPageList.i18n.magic.php |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'dpl' => array( 0, 'dpl' ), |
| 12 | + 'dplnum' => array( 0, 'dplnum' ), |
| 13 | + 'dplchapter' => array( 0, 'dplchapter' ), |
| 14 | + 'dplmatrix' => array( 0, 'dplmatrix' ), |
| 15 | + 'DynamicPageList' => array( 0, 'DynamicPageList' ), |
| 16 | +); |
Property changes on: trunk/extensions/DynamicPageList/DynamicPageList.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 17 | + native |
Added: svn:keywords |
2 | 18 | + Id |
Index: trunk/extensions/FCKeditor/FCKeditor.body.php |
— | — | @@ -75,12 +75,6 @@ |
76 | 76 | return $this->excludedNamespaces; |
77 | 77 | } |
78 | 78 | |
79 | | - public static function onLanguageGetMagic( &$magicWords, $langCode ) { |
80 | | - $magicWords['NORICHEDITOR'] = array( 0, '__NORICHEDITOR__' ); |
81 | | - |
82 | | - return true; |
83 | | - } |
84 | | - |
85 | 79 | public static function onParserBeforeInternalParse( &$parser, &$text, &$strip_state ) { |
86 | 80 | MagicWord::get( 'NORICHEDITOR' )->matchAndRemove( $text ); |
87 | 81 | |
— | — | @@ -706,5 +700,4 @@ |
707 | 701 | |
708 | 702 | return true; |
709 | 703 | } |
710 | | - |
711 | 704 | } |
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'NORICHEDITOR' => array( 0, '__NORICHEDITOR__' ), |
| 12 | +); |
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/FCKeditor/FCKeditor.php |
— | — | @@ -86,6 +86,7 @@ |
87 | 87 | |
88 | 88 | // Path to internationalization file |
89 | 89 | $wgExtensionMessagesFiles['FCKeditor'] = $dir . 'FCKeditor.i18n.php'; |
| 90 | +$wgExtensionMessagesFiles['FCKeditorMagic'] = $dir . 'FCKeditor.i18n.magic.php'; |
90 | 91 | |
91 | 92 | // Initialize FCKeditor and the MediaWiki extension |
92 | 93 | // @fixme something like this should be delayed until it's actually time |
— | — | @@ -107,7 +108,6 @@ |
108 | 109 | $wgHooks['EditPageBeforePreviewText'][] = array( $oFCKeditorExtension, 'onEditPageBeforePreviewText' ); |
109 | 110 | $wgHooks['EditPagePreviewTextEnd'][] = array( $oFCKeditorExtension, 'onEditPagePreviewTextEnd' ); |
110 | 111 | $wgHooks['CustomEditor'][] = array( $oFCKeditorExtension, 'onCustomEditor' ); |
111 | | -$wgHooks['LanguageGetMagic'][] = 'FCKeditor_MediaWiki::onLanguageGetMagic'; |
112 | 112 | $wgHooks['ParserBeforeStrip'][] = 'FCKeditor_MediaWiki::onParserBeforeStrip'; |
113 | 113 | $wgHooks['ParserBeforeInternalParse'][] = 'FCKeditor_MediaWiki::onParserBeforeInternalParse'; |
114 | 114 | $wgHooks['EditPageBeforeConflictDiff'][] = 'FCKeditor_MediaWiki::onEditPageBeforeConflictDiff'; |
Index: trunk/extensions/DPLforum/DPLforum.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'forumlink' => array( 0, 'forumlink' ), |
| 12 | +); |
Property changes on: trunk/extensions/DPLforum/DPLforum.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/DPLforum/DPLforum.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | 'path' => __FILE__, |
42 | 42 | 'name' => 'DPLforum', |
43 | 43 | 'author' => 'Ross McClure', |
44 | | - 'version' => '3.3.3', |
| 44 | + 'version' => '3.4.0', |
45 | 45 | 'url' => 'https://www.mediawiki.org/wiki/Extension:DPLforum', |
46 | 46 | 'descriptionmsg' => 'dplforum-desc', |
47 | 47 | ); |
— | — | @@ -51,12 +51,12 @@ |
52 | 52 | |
53 | 53 | // Hooked functions |
54 | 54 | $wgHooks['ParserFirstCallInit'][] = 'wfDPLinit'; |
55 | | -$wgHooks['LanguageGetMagic'][] = 'wfDPLmagic'; |
56 | 55 | $wgHooks['CanonicalNamespaces'][] = 'wfDPLforumCanonicalNamespaces'; |
57 | 56 | |
58 | 57 | // Set up i18n and autoload the main class |
59 | 58 | $dir = dirname( __FILE__ ) . '/'; |
60 | 59 | $wgExtensionMessagesFiles['DPLforum'] = $dir . 'DPLforum.i18n.php'; |
| 60 | +$wgExtensionMessagesFiles['DPLforumMagic'] = $dir . 'DPLforum.i18n.magic.php'; |
61 | 61 | $wgExtensionMessagesFiles['DPLforumNamespaces'] = $dir . 'DPLforum.namespaces.php'; |
62 | 62 | $wgAutoloadClasses['DPLForum'] = $dir . 'DPLforum_body.php'; |
63 | 63 | |
— | — | @@ -66,14 +66,6 @@ |
67 | 67 | return true; |
68 | 68 | } |
69 | 69 | |
70 | | -function wfDPLmagic( &$magicWords, $langCode = 'en' ) { |
71 | | - switch( $langCode ) { |
72 | | - default: |
73 | | - $magicWords['forumlink'] = array( 0, 'forumlink' ); |
74 | | - } |
75 | | - return true; |
76 | | -} |
77 | | - |
78 | 70 | function parseForum( $input, $argv, $parser ) { |
79 | 71 | $f = new DPLForum(); |
80 | 72 | return $f->parse( $input, $parser ); |
— | — | @@ -90,4 +82,4 @@ |
91 | 83 | $list[NS_FORUM] = 'Forum'; |
92 | 84 | $list[NS_FORUM_TALK] = 'Forum_talk'; |
93 | 85 | return true; |
94 | | -} |
\ No newline at end of file |
| 86 | +} |
Index: trunk/extensions/EmbedVideo/EmbedVideo.hooks.php |
— | — | @@ -15,32 +15,18 @@ |
16 | 16 | public static function setup( $parser ) { |
17 | 17 | # Setup parser hooks. ev is the primary hook, evp is supported for |
18 | 18 | # legacy purposes |
19 | | - global $wgVersion; |
20 | | - $prefix = version_compare($wgVersion, '1.7', '<') ? '#' : ''; |
21 | | - EmbedVideo::addMagicWord($prefix, "ev", "EmbedVideo::parserFunction_ev"); |
22 | | - EmbedVideo::addMagicWord($prefix, "evp", "EmbedVideo::parserFunction_evp"); |
| 19 | + EmbedVideo::addMagicWord("ev", "EmbedVideo::parserFunction_ev"); |
| 20 | + EmbedVideo::addMagicWord("evp", "EmbedVideo::parserFunction_evp"); |
23 | 21 | |
24 | 22 | return true; |
25 | 23 | } |
26 | 24 | |
27 | | - private static function addMagicWord($prefix, $word, $function) { |
| 25 | + private static function addMagicWord($word, $function) { |
28 | 26 | global $wgParser; |
29 | | - $wgParser->setFunctionHook($prefix . $word, $function); |
| 27 | + $wgParser->setFunctionHook($word, $function); |
30 | 28 | } |
31 | 29 | |
32 | 30 | /** |
33 | | - * Adds magic words for parser functions. |
34 | | - * @param Array $magicWords |
35 | | - * @param $langCode |
36 | | - * @return Boolean Always true |
37 | | - */ |
38 | | - public static function parserFunctionMagic(&$magicWords, $langCode='en') { |
39 | | - $magicWords['evp'] = array(0, 'evp'); |
40 | | - $magicWords['ev'] = array(0, 'ev'); |
41 | | - return true; |
42 | | - } |
43 | | - |
44 | | - /** |
45 | 31 | * Embeds video of the chosen service, legacy support for 'evp' version of |
46 | 32 | * the tag |
47 | 33 | * @param Parser $parser Instance of running Parser. |
Index: trunk/extensions/EmbedVideo/EmbedVideo.i18n.magic.php |
— | — | @@ -0,0 +1,12 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'evp' => array( 0, 'evp' ), |
| 12 | + 'ev' => array( 0, 'ev' ), |
| 13 | +); |
Property changes on: trunk/extensions/EmbedVideo/EmbedVideo.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 14 | + native |
Added: svn:keywords |
2 | 15 | + Id |
Index: trunk/extensions/EmbedVideo/EmbedVideo.php |
— | — | @@ -24,23 +24,13 @@ |
25 | 25 | 'author' => array( 'Jim R. Wilson', 'Andrew Whitworth' ), |
26 | 26 | 'url' => 'https://www.mediawiki.org/wiki/Extension:EmbedVideo', |
27 | 27 | 'descriptionmsg' => 'embedvideo-desc', |
28 | | - 'version' => '1.0' |
| 28 | + 'version' => '1.1' |
29 | 29 | ); |
30 | 30 | |
31 | 31 | $dir = dirname(__FILE__) . '/'; |
32 | | -require_once($dir . "EmbedVideo.hooks.php"); |
| 32 | +require_once($dir . "EmbedVideo.hooks.php"); // @todo FIXME: Use autoloader to load classes. |
33 | 33 | require_once($dir . "EmbedVideo.Services.php"); |
34 | | -$wgExtensionMessagesFiles['embedvideo'] = $dir . 'EmbedVideo.i18n.php'; |
| 34 | +$wgExtensionMessagesFiles['EmbedVideo'] = $dir . 'EmbedVideo.i18n.php'; |
| 35 | +$wgExtensionMessagesFiles['EmbedVideoMagic'] = $dir . 'EmbedVideo.i18n.magic.php'; |
35 | 36 | |
36 | | - |
37 | 37 | $wgHooks['ParserFirstCallInit'][] = "EmbedVideo::setup"; |
38 | | -if (version_compare($wgVersion, '1.7', '<')) { |
39 | | - # Hack solution to resolve 1.6 array parameter nullification for hook args |
40 | | - function wfEmbedVideoLanguageGetMagic( &$magicWords ) { |
41 | | - EmbedVideo::parserFunctionMagic( $magicWords ); |
42 | | - return true; |
43 | | - } |
44 | | - $wgHooks['LanguageGetMagic'][] = 'wfEmbedVideoLanguageGetMagic'; |
45 | | -} else { |
46 | | - $wgHooks['LanguageGetMagic'][] = 'EmbedVideo::parserFunctionMagic'; |
47 | | -} |
Index: trunk/extensions/ExtTab/includes/ET_Initialize.php |
— | — | @@ -14,11 +14,10 @@ |
15 | 15 | |
16 | 16 | global $wgExtensionFunctions, $wgHooks, $wgAutoloadClasses, $smwgExtTabEnableLocalEdit; |
17 | 17 | $wgExtensionFunctions[] = 'smwgExtTabSetupExtension'; |
18 | | -$wgHooks['LanguageGetMagic'][] = 'ETParserFunctions::languageGetMagic'; |
19 | 18 | |
| 19 | +$wgExtensionMessagesFiles['ExtTabMagic'] = $smwgExtTabIP . '/languages/ExtTab.i18n.magic.php'; |
20 | 20 | $wgAutoloadClasses['ETParserFunctions'] = $smwgExtTabIP . '/includes/ET_ParserFunctions.php'; |
21 | 21 | |
22 | | - |
23 | 22 | function smwfExtTabInitMessages() { |
24 | 23 | global $smwgExtTabMessagesInitialized; |
25 | 24 | if ( isset( $smwgExtTabMessagesInitialized ) ) return; // prevent double init |
— | — | @@ -111,9 +110,10 @@ |
112 | 111 | // Register Credits |
113 | 112 | $wgExtensionCredits['parserhook'][] = array( |
114 | 113 | 'name' => 'Semantic ExtTab Extension', 'version' => SMW_EXTTAB_VERSION, |
115 | | - 'author' => "Ning Hu, Justin Zhang, [http://smwforum.ontoprise.com/smwforum/index.php/Jesse_Wang Jesse Wang], sponsored by [http://projecthalo.com Project Halo], [http://www.vulcan.com Vulcan Inc.]", |
116 | | - 'url' => 'http://wiking.vulcan.com/dev', |
117 | | - 'description' => 'Tab control based on ExtJS.' ); |
| 114 | + 'author' => "Ning Hu, Justin Zhang, [http://smwforum.ontoprise.com/smwforum/index.php/Jesse_Wang Jesse Wang], sponsored by [http://projecthalo.com Project Halo], [http://www.vulcan.com Vulcan Inc.]", |
| 115 | + 'url' => 'http://wiking.vulcan.com/dev', |
| 116 | + 'description' => 'Tab control based on ExtJS.', |
| 117 | + ); |
118 | 118 | |
119 | 119 | return true; |
120 | 120 | } |
Index: trunk/extensions/ExtTab/includes/ET_ParserFunctions.php |
— | — | @@ -4,14 +4,6 @@ |
5 | 5 | */ |
6 | 6 | |
7 | 7 | class ETParserFunctions { |
8 | | - static function languageGetMagic( &$magicWords, $langCode = "en" ) { |
9 | | - switch ( $langCode ) { |
10 | | - default: |
11 | | - $magicWords['tab'] = array ( 0, 'tab' ); |
12 | | - } |
13 | | - return true; |
14 | | - } |
15 | | - |
16 | 8 | static function registerFunctions( &$parser ) { |
17 | 9 | $parser->setFunctionHook( 'tab', array( 'ETParserFunctions', 'renderTabWidget' ), SFH_OBJECT_ARGS ); |
18 | 10 | $parser->setHook( "embedwiki", array( 'ETParserFunctions', 'embedWiki' ) ); |
— | — | @@ -138,5 +130,4 @@ |
139 | 131 | $str .= '</div>'; |
140 | 132 | return array( $str, 'noparse' => true, 'isHTML' => false ); |
141 | 133 | } |
142 | | - |
143 | 134 | } |
Index: trunk/extensions/ExtTab/languages/ExtTab.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'tab' => array( 0, 'tab' ), |
| 12 | +); |
Property changes on: trunk/extensions/ExtTab/languages/ExtTab.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/CSS/CSS.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'css' => array( 0, 'css' ), |
| 12 | +); |
Property changes on: trunk/extensions/CSS/CSS.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/CSS/CSS.php |
— | — | @@ -16,17 +16,16 @@ |
17 | 17 | * @licence GNU General Public Licence 2.0 or later |
18 | 18 | */ |
19 | 19 | |
20 | | -if ( !defined( 'MEDIAWIKI' ) ) die( 'Not an entry point.' ); |
| 20 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 21 | + die( 'Not an entry point.' ); |
| 22 | +} |
21 | 23 | |
22 | | -define( 'CSS_VERSION', '3.0, 2011-11-18' ); |
| 24 | +define( 'CSS_VERSION', '3.1, 2012-01-15' ); |
23 | 25 | |
24 | | -$wgCSSMagic = 'css'; |
25 | 26 | $wgCSSPath = false; |
26 | 27 | $wgCSSIdentifier = 'css-extension'; |
27 | 28 | |
28 | 29 | $wgHooks['ParserFirstCallInit'][] = 'wfCSSParserFirstCallInit'; |
29 | | -// FIXME: LanguageGetMagic is deprecated. |
30 | | -$wgHooks['LanguageGetMagic'][] = 'wfCSSLanguageGetMagic'; |
31 | 30 | $wgHooks['RawPageViewBeforeOutput'][] = 'wfCSSRawPageViewBeforeOutput'; |
32 | 31 | |
33 | 32 | $wgExtensionCredits['parserhook'][] = array( |
— | — | @@ -39,6 +38,7 @@ |
40 | 39 | ); |
41 | 40 | |
42 | 41 | $wgExtensionMessagesFiles['CSS'] = dirname( __FILE__ ) . '/' . 'CSS.i18n.php'; |
| 42 | +$wgExtensionMessagesFiles['CSSMagic'] = dirname( __FILE__ ) . '/' . 'CSS.i18n.magic.php'; |
43 | 43 | |
44 | 44 | $wgResourceModules['ext.CSS'] = array( |
45 | 45 | 'scripts' => 'verifyCSSLoad.js', |
— | — | @@ -110,19 +110,13 @@ |
111 | 111 | } |
112 | 112 | |
113 | 113 | function wfCSSParserFirstCallInit( $parser ) { |
114 | | - global $wgCSSMagic; |
115 | | - $parser->setFunctionHook( $wgCSSMagic, 'wfCSSRender' ); |
| 114 | + $parser->setFunctionHook( 'css', 'wfCSSRender' ); |
116 | 115 | return true; |
117 | 116 | } |
118 | 117 | |
119 | | -function wfCSSLanguageGetMagic( &$magicWords, $langCode = 0 ) { |
120 | | - global $wgCSSMagic; |
121 | | - $magicWords[$wgCSSMagic] = array( $langCode, $wgCSSMagic ); |
122 | | - return true; |
123 | | -} |
124 | | - |
125 | 118 | function wfCSSRawPageViewBeforeOutput( &$rawPage, &$text ) { |
126 | 119 | global $wgCSSIdentifier; |
| 120 | + |
127 | 121 | if ( $rawPage->getRequest()->getBool( $wgCSSIdentifier ) ) { |
128 | 122 | $text = Sanitizer::checkCss( $text ); |
129 | 123 | } |
Index: trunk/extensions/DateDiff/DateDiff.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'dates' => array( 0, 'dates' ), |
| 12 | +); |
Property changes on: trunk/extensions/DateDiff/DateDiff.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/DateDiff/DateDiff.php |
— | — | @@ -1,5 +1,4 @@ |
2 | 2 | <?php |
3 | | - |
4 | 3 | /** |
5 | 4 | * DateDiff extension. |
6 | 5 | * |
— | — | @@ -15,9 +14,10 @@ |
16 | 15 | die( 'Not an entry point.' ); |
17 | 16 | } |
18 | 17 | |
19 | | -define( 'Datediff_VERSION', '0.1.1' ); |
| 18 | +define( 'Datediff_VERSION', '0.2.0' ); |
20 | 19 | |
21 | 20 | $wgExtensionMessagesFiles['DateDiff'] = dirname( __FILE__ ) . '/DateDiff.i18n.php'; |
| 21 | +$wgExtensionMessagesFiles['DateDiffMagic'] = dirname( __FILE__ ) . '/DateDiff.i18n.magic.php'; |
22 | 22 | |
23 | 23 | // Extension credits that show up on Special:Version |
24 | 24 | $wgExtensionCredits['parserhook'][] = array( |
— | — | @@ -33,21 +33,12 @@ |
34 | 34 | ); |
35 | 35 | |
36 | 36 | $wgHooks['ParserFirstCallInit'][] = 'efDDDateDiff'; |
37 | | -$wgHooks['LanguageGetMagic'][] = 'efDDDatesFunctionMagic'; |
38 | 37 | |
39 | 38 | function efDDDateDiff( Parser &$parser ) { |
40 | 39 | $parser->setFunctionHook( 'dates', 'efDDCalcDates' ); |
41 | 40 | return true; |
42 | 41 | } |
43 | 42 | |
44 | | -/** |
45 | | - * Adds the magic words for the parser functions. |
46 | | - */ |
47 | | -function efDDDatesFunctionMagic( &$magicWords, $langCode ) { |
48 | | - $magicWords['dates'] = array( 0, 'dates' ); |
49 | | - return true; |
50 | | -} |
51 | | - |
52 | 43 | function efDDCalcDates( &$parser ) { |
53 | 44 | $params = func_get_args(); |
54 | 45 | |
— | — | @@ -80,4 +71,4 @@ |
81 | 72 | } |
82 | 73 | |
83 | 74 | return implode( ',', $days ); |
84 | | -} |
\ No newline at end of file |
| 75 | +} |
Index: trunk/extensions/GeeQuBox/GeeQuBox.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'geequbox' => array( 0, 'geequbox' ), |
| 12 | +); |
Property changes on: trunk/extensions/GeeQuBox/GeeQuBox.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/GeeQuBox/GeeQuBox.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | $wgExtensionCredits['parserhook'][] = array( |
25 | 25 | 'path' => __FILE__, |
26 | 26 | 'name' => 'GeeQuBox', |
27 | | - 'version' => '0.02.1', |
| 27 | + 'version' => '0.03.0', |
28 | 28 | 'author' => array( '[http://www.mediawiki.org/wiki/User:Clausekwis David Raison]' ), |
29 | 29 | 'url' => 'https://www.mediawiki.org/wiki/Extension:GeeQuBox', |
30 | 30 | 'descriptionmsg' => 'geequbox-desc' |
— | — | @@ -41,27 +41,22 @@ |
42 | 42 | 'remoteExtPath' => EXTPATH |
43 | 43 | ); |
44 | 44 | |
45 | | - |
46 | 45 | // defaults |
47 | 46 | $wgGqbDefaultWidth = 640; |
48 | 47 | |
49 | 48 | $wgExtensionMessagesFiles['GeeQuBox'] = dirname(__FILE__) .'/GeeQuBox.i18n.php'; |
50 | | -$wgHooks['LanguageGetMagic'][] = 'wfGeeQuBoxLanguageGetMagic'; |
| 49 | +$wgExtensionMessagesFiles['GeeQuBoxMagic'] = dirname(__FILE__) .'/GeeQuBox.i18n.magic.php'; |
51 | 50 | |
52 | 51 | $gqb = new GeeQuBox; |
53 | 52 | $wgHooks['BeforeParserrenderImageGallery'][] = array($gqb,'gqbAnalyse'); |
54 | 53 | $wgHooks['BeforePageDisplay'][] = array($gqb,'gqbAddLightbox'); |
55 | 54 | |
56 | | -function wfGeeQuBoxLanguageGetMagic( &$magicWords, $langCode = 'en' ) { |
57 | | - $magicWords['geequbox'] = array( 0, 'geequbox' ); |
58 | | - return true; |
59 | | -} |
| 55 | +// @todo FIXME: Put this class in a separate file. |
60 | 56 | |
61 | 57 | /** |
62 | 58 | * Class that handles all GeeQuBox operations. |
63 | 59 | */ |
64 | 60 | class GeeQuBox { |
65 | | - |
66 | 61 | private static $_page; |
67 | 62 | private $_hasGallery; |
68 | 63 | |
— | — | @@ -93,7 +88,6 @@ |
94 | 89 | } else return false; |
95 | 90 | } |
96 | 91 | |
97 | | - |
98 | 92 | private function _gqbAddScripts() { |
99 | 93 | global $wgExtensionAssetsPath; |
100 | 94 | |
— | — | @@ -157,6 +151,4 @@ |
158 | 152 | |
159 | 153 | return 'href="'. $iPath .'" title="'. htmlspecialchars( $title ) .'" class="image"'; |
160 | 154 | } |
161 | | - |
162 | 155 | } |
163 | | - |
Index: trunk/extensions/ContributionScores/ContributionScores.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | 'url' => 'https://www.mediawiki.org/wiki/Extension:Contribution_Scores', |
17 | 17 | 'author' => 'Tim Laqua', |
18 | 18 | 'descriptionmsg' => 'contributionscores-desc', |
19 | | - 'version' => '1.14' |
| 19 | + 'version' => '1.15' |
20 | 20 | ); |
21 | 21 | |
22 | 22 | $dir = dirname( __FILE__ ) . '/'; |
— | — | @@ -35,9 +35,8 @@ |
36 | 36 | |
37 | 37 | $wgExtensionMessagesFiles['ContributionScores'] = $dir . 'ContributionScores.i18n.php'; |
38 | 38 | $wgExtensionMessagesFiles['ContributionScoresAlias'] = $dir . 'ContributionScores.alias.php'; |
| 39 | +$wgExtensionMessagesFiles['ContributionScoresMagic'] = $dir . 'ContributionScores.i18n.magic.php'; |
39 | 40 | |
40 | | -$wgHooks['LanguageGetMagic'][] = 'efContributionScores_LanguageGetMagic'; |
41 | | - |
42 | 41 | $wgHooks['ParserFirstCallInit'][] = 'efContributionScores_Setup'; |
43 | 42 | |
44 | 43 | function efContributionScores_Setup( &$parser ) { |
— | — | @@ -45,11 +44,6 @@ |
46 | 45 | return true; |
47 | 46 | } |
48 | 47 | |
49 | | -function efContributionScores_LanguageGetMagic( &$magicWords, $langCode ) { |
50 | | - $magicWords['cscore'] = array( 0, 'cscore' ); |
51 | | - return true; |
52 | | -} |
53 | | - |
54 | 48 | function efContributionScores_Render( &$parser, $usertext, $metric = 'score' ) { |
55 | 49 | global $wgContribScoreDisableCache; |
56 | 50 | |
Index: trunk/extensions/ContributionScores/ContributionScores.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'cscore' => array( 0, 'cscore' ), |
| 12 | +); |
Property changes on: trunk/extensions/ContributionScores/ContributionScores.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/Hanp/Hanp.php |
— | — | @@ -15,24 +15,19 @@ |
16 | 16 | $wgExtensionCredits['other'][] = array( |
17 | 17 | 'path' => __FILE__, |
18 | 18 | 'name' => 'Hangul particle chooser', |
19 | | - 'version' => '2008-09-21', |
| 19 | + 'version' => '2012-01-15', |
20 | 20 | 'author' => 'Niklas Laxström', |
21 | 21 | 'url' => 'https://bugzilla.wikimedia.org/show_bug.cgi?id=13712', |
22 | 22 | 'descriptionmsg' => 'hanp-desc', |
23 | 23 | ); |
24 | 24 | |
25 | 25 | $dir = dirname( __FILE__ ) . '/'; |
26 | | -$wgExtensionMessagesFiles['hanp'] = $dir . 'Hanp.i18n.php'; |
| 26 | +$wgExtensionMessagesFiles['Hanp'] = $dir . 'Hanp.i18n.php'; |
| 27 | +$wgExtensionMessagesFiles['HanpMagic'] = $dir . 'Hanp.i18n.magic.php'; |
27 | 28 | $wgAutoloadClasses['Hanp'] = $dir . 'Hanp.body.php'; |
28 | | -$wgHooks['LanguageGetMagic'][] = 'efHanpLanguageGetMagic'; |
29 | 29 | $wgHooks['ParserFirstCallInit'][] = 'efHanpInit'; |
30 | 30 | |
31 | 31 | function efHanpInit( &$parser ) { |
32 | 32 | $parser->setFunctionHook( 'hanp', array( 'Hanp', 'hangulParticle' ) ); |
33 | 33 | return true; |
34 | 34 | } |
35 | | - |
36 | | -function efHanpLanguageGetMagic( &$magicWords, $langCode = 'en' ) { |
37 | | - $magicWords['hanp'] = array( 0, 'hanp' ); |
38 | | - return true; |
39 | | -} |
Index: trunk/extensions/Hanp/Hanp.i18n.magic.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Magic words for extension. |
| 5 | + */ |
| 6 | + |
| 7 | +$magicWords = array(); |
| 8 | + |
| 9 | +/** English (English) */ |
| 10 | +$magicWords['en'] = array( |
| 11 | + 'hanp' => array( 0, 'hanp' ), |
| 12 | +); |
Property changes on: trunk/extensions/Hanp/Hanp.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.setup.php |
— | — | @@ -246,6 +246,7 @@ |
247 | 247 | if ( $wgFlaggedRevsProtection ) { |
248 | 248 | # Add pending changes related magic words |
249 | 249 | $wgHooks['ParserFirstCallInit'][] = 'FlaggedRevsHooks::onParserFirstCallInit'; |
| 250 | + // @todo FIXME: Use $wgExtensionMessagesFiles instead of LanguageGetMagic hook. |
250 | 251 | $wgHooks['LanguageGetMagic'][] = 'FlaggedRevsHooks::onLanguageGetMagic'; |
251 | 252 | $wgHooks['ParserGetVariableValueSwitch'][] = 'FlaggedRevsHooks::onParserGetVariableValueSwitch'; |
252 | 253 | $wgHooks['MagicWordwgVariableIDs'][] = 'FlaggedRevsHooks::onMagicWordwgVariableIDs'; |