Index: trunk/extensions/Plotters/Plotters.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | $wgExtensionCredits['other'][] = array( |
29 | 29 | 'path' => __FILE__, |
30 | 30 | 'name' => 'Plotter parser extension', |
31 | | - 'version' => '0.6a', |
| 31 | + 'version' => '0.6b', |
32 | 32 | 'author' => 'Ryan Lane', |
33 | 33 | 'description' => 'Allows users to create client side graphs and plots', |
34 | 34 | 'descriptionmsg' => 'plotters-desc', |
— | — | @@ -37,6 +37,9 @@ |
38 | 38 | $wgExtensionFunctions[] = "efPlotters"; |
39 | 39 | |
40 | 40 | $wgHooks['OutputPageParserOutput'][] = 'PlottersParserOutput'; |
| 41 | +if( version_compare( $wgVersion, '1.16alpha', '<' ) ) { |
| 42 | + $wgHooks['LanguageGetMagic'][] = 'PlottersLanguageGetMagic'; |
| 43 | +} |
41 | 44 | $wgHooks['ArticleSaveComplete'][] = 'wfPlottersArticleSaveComplete'; |
42 | 45 | |
43 | 46 | $dir = dirname( __FILE__ ) . '/'; |
— | — | @@ -246,3 +249,13 @@ |
247 | 250 | } |
248 | 251 | return true; |
249 | 252 | } |
| 253 | + |
| 254 | +// FIXME: doesn't this make using this method and the hook above useless? |
| 255 | +/** |
| 256 | + * We ignore langCode - parser function names can be translated but |
| 257 | + * we are not using this feature |
| 258 | + */ |
| 259 | +function PlottersLanguageGetMagic( &$magicWords, $langCode ) { |
| 260 | + $magicWords['plot'] = array( 0, 'plot' ); |
| 261 | + return true; |
| 262 | +} |