Index: trunk/extensions/SmoothGallery/SmoothGallery.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | $wgExtensionCredits['other'][] = array( |
37 | 37 | 'path' => __FILE__, |
38 | 38 | 'name' => 'SmoothGallery parser extension', |
39 | | - 'version' => '1.1f', |
| 39 | + 'version' => '1.1g', |
40 | 40 | 'author' => 'Ryan Lane', |
41 | 41 | 'description' => 'Allows users to create galleries with images that have been uploaded. Allows most options of SmoothGallery', |
42 | 42 | 'descriptionmsg' => 'smoothgallery-desc', |
— | — | @@ -48,7 +48,11 @@ |
49 | 49 | |
50 | 50 | $dir = dirname( __FILE__ ) . '/'; |
51 | 51 | $wgExtensionMessagesFiles['SmoothGallery'] = $dir . 'SmoothGallery.i18n.php'; |
52 | | -$wgExtensionMessagesFiles['SmoothGalleryMagic'] = $dir . 'SmoothGallery.i18n.magic.php'; |
| 52 | +if( version_compare( $wgVersion, '1.16alpha', '>=' ) ) { |
| 53 | + $wgExtensionMessagesFiles['SmoothGalleryMagic'] = $dir . 'SmoothGallery.i18n.magic.php'; |
| 54 | +} else { |
| 55 | + $wgHooks['LanguageGetMagic'][] = 'smoothGalleryLanguageGetMagic'; |
| 56 | +} |
53 | 57 | $wgAutoloadClasses['SmoothGallery'] = $dir . 'SmoothGalleryClass.php'; |
54 | 58 | $wgAutoloadClasses['SmoothGalleryParser'] = $dir . 'SmoothGalleryParser.php'; |
55 | 59 | |
— | — | @@ -142,3 +146,12 @@ |
143 | 147 | } |
144 | 148 | return true; |
145 | 149 | } |
| 150 | + |
| 151 | +/** |
| 152 | + * We ignore langCode - parser function names can be translated but |
| 153 | + * we are not using this feature |
| 154 | + */ |
| 155 | +function smoothGalleryLanguageGetMagic( &$magicWords, $langCode ) { |
| 156 | + $magicWords['sgallery'] = array( 0, 'sgallery' ); |
| 157 | + return true; |
| 158 | +} |