Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -170,28 +170,20 @@ |
171 | 171 | |
172 | 172 | # Required for #coordinates. |
173 | 173 | $wgHooks['ParserFirstCallInit'][] = 'MapsCoordinates::staticInit'; |
174 | | - $wgHooks['LanguageGetMagic'][] = 'MapsCoordinates::staticMagic'; |
175 | 174 | # Required for #display_map. |
176 | 175 | $wgHooks['ParserFirstCallInit'][] = 'MapsDisplayMap::staticInit'; |
177 | | - $wgHooks['LanguageGetMagic'][] = 'MapsDisplayMap::staticMagic'; |
178 | 176 | # Required for #display_point. |
179 | 177 | $wgHooks['ParserFirstCallInit'][] = 'MapsDisplayPoint::staticInit'; |
180 | | - $wgHooks['LanguageGetMagic'][] = 'MapsDisplayPoint::staticMagic'; |
181 | 178 | # Required for #distance. |
182 | 179 | $wgHooks['ParserFirstCallInit'][] = 'MapsDistance::staticInit'; |
183 | | - $wgHooks['LanguageGetMagic'][] = 'MapsDistance::staticMagic'; |
184 | 180 | # Required for #finddestination. |
185 | 181 | $wgHooks['ParserFirstCallInit'][] = 'MapsFinddestination::staticInit'; |
186 | | - $wgHooks['LanguageGetMagic'][] = 'MapsFinddestination::staticMagic'; |
187 | 182 | # Required for #geocode. |
188 | 183 | $wgHooks['ParserFirstCallInit'][] = 'MapsGeocode::staticInit'; |
189 | | - $wgHooks['LanguageGetMagic'][] = 'MapsGeocode::staticMagic'; |
190 | 184 | # Required for #geodistance. |
191 | 185 | $wgHooks['ParserFirstCallInit'][] = 'MapsGeodistance::staticInit'; |
192 | | - $wgHooks['LanguageGetMagic'][] = 'MapsGeodistance::staticMagic'; |
193 | 186 | # Required for #mapsdoc. |
194 | 187 | $wgHooks['ParserFirstCallInit'][] = 'MapsMapsDoc::staticInit'; |
195 | | - $wgHooks['LanguageGetMagic'][] = 'MapsMapsDoc::staticMagic'; |
196 | 188 | |
197 | 189 | # Geocoders |
198 | 190 | |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Coordinates.php |
— | — | @@ -13,19 +13,9 @@ |
14 | 14 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
15 | 15 | */ |
16 | 16 | class MapsCoordinates extends ParserHook { |
17 | | - |
18 | 17 | /** |
19 | 18 | * No LSB in pre-5.3 PHP *sigh*. |
20 | 19 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
21 | | - */ |
22 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
23 | | - $instance = new self; |
24 | | - return $instance->magic( $magicWords, $langCode ); |
25 | | - } |
26 | | - |
27 | | - /** |
28 | | - * No LSB in pre-5.3 PHP *sigh*. |
29 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
30 | 20 | */ |
31 | 21 | public static function staticInit( Parser &$parser ) { |
32 | 22 | $instance = new self; |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Distance.php |
— | — | @@ -13,19 +13,9 @@ |
14 | 14 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
15 | 15 | */ |
16 | 16 | class MapsDistance extends ParserHook { |
17 | | - |
18 | 17 | /** |
19 | 18 | * No LSB in pre-5.3 PHP *sigh*. |
20 | 19 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
21 | | - */ |
22 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
23 | | - $instance = new self; |
24 | | - return $instance->magic( $magicWords, $langCode ); |
25 | | - } |
26 | | - |
27 | | - /** |
28 | | - * No LSB in pre-5.3 PHP *sigh*. |
29 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
30 | 20 | */ |
31 | 21 | public static function staticInit( Parser &$parser ) { |
32 | 22 | $instance = new self; |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_DisplayPoint.php |
— | — | @@ -12,19 +12,9 @@ |
13 | 13 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 14 | */ |
15 | 15 | class MapsDisplayPoint extends ParserHook { |
16 | | - |
17 | 16 | /** |
18 | 17 | * No LSB in pre-5.3 PHP *sigh*. |
19 | 18 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
20 | | - */ |
21 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
22 | | - $instance = new self; |
23 | | - return $instance->magic( $magicWords, $langCode ); |
24 | | - } |
25 | | - |
26 | | - /** |
27 | | - * No LSB in pre-5.3 PHP *sigh*. |
28 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
29 | 19 | */ |
30 | 20 | public static function staticInit( Parser &$parser ) { |
31 | 21 | $instance = new self; |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Finddestination.php |
— | — | @@ -13,19 +13,9 @@ |
14 | 14 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
15 | 15 | */ |
16 | 16 | class MapsFinddestination extends ParserHook { |
17 | | - |
18 | 17 | /** |
19 | 18 | * No LSB in pre-5.3 PHP *sigh*. |
20 | 19 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
21 | | - */ |
22 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
23 | | - $instance = new self; |
24 | | - return $instance->magic( $magicWords, $langCode ); |
25 | | - } |
26 | | - |
27 | | - /** |
28 | | - * No LSB in pre-5.3 PHP *sigh*. |
29 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
30 | 20 | */ |
31 | 21 | public static function staticInit( Parser &$parser ) { |
32 | 22 | $instance = new self; |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_DisplayMap.php |
— | — | @@ -12,19 +12,9 @@ |
13 | 13 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
14 | 14 | */ |
15 | 15 | class MapsDisplayMap extends ParserHook { |
16 | | - |
17 | 16 | /** |
18 | 17 | * No LSB in pre-5.3 PHP *sigh*. |
19 | 18 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
20 | | - */ |
21 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
22 | | - $instance = new self; |
23 | | - return $instance->magic( $magicWords, $langCode ); |
24 | | - } |
25 | | - |
26 | | - /** |
27 | | - * No LSB in pre-5.3 PHP *sigh*. |
28 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
29 | 19 | */ |
30 | 20 | public static function staticInit( Parser &$parser ) { |
31 | 21 | $instance = new self; |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Geocode.php |
— | — | @@ -13,19 +13,9 @@ |
14 | 14 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
15 | 15 | */ |
16 | 16 | class MapsGeocode extends ParserHook { |
17 | | - |
18 | 17 | /** |
19 | 18 | * No LSB in pre-5.3 PHP *sigh*. |
20 | 19 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
21 | | - */ |
22 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
23 | | - $instance = new self; |
24 | | - return $instance->magic( $magicWords, $langCode ); |
25 | | - } |
26 | | - |
27 | | - /** |
28 | | - * No LSB in pre-5.3 PHP *sigh*. |
29 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
30 | 20 | */ |
31 | 21 | public static function staticInit( Parser &$parser ) { |
32 | 22 | $instance = new self; |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Geodistance.php |
— | — | @@ -13,19 +13,9 @@ |
14 | 14 | * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
15 | 15 | */ |
16 | 16 | class MapsGeodistance extends ParserHook { |
17 | | - |
18 | 17 | /** |
19 | 18 | * No LSB in pre-5.3 PHP *sigh*. |
20 | 19 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
21 | | - */ |
22 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
23 | | - $instance = new self; |
24 | | - return $instance->magic( $magicWords, $langCode ); |
25 | | - } |
26 | | - |
27 | | - /** |
28 | | - * No LSB in pre-5.3 PHP *sigh*. |
29 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
30 | 20 | */ |
31 | 21 | public static function staticInit( Parser &$parser ) { |
32 | 22 | $instance = new self; |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_MapsDoc.php |
— | — | @@ -27,15 +27,6 @@ |
28 | 28 | * No LSB in pre-5.3 PHP *sigh*. |
29 | 29 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
30 | 30 | */ |
31 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
32 | | - $instance = new self; |
33 | | - return $instance->magic( $magicWords, $langCode ); |
34 | | - } |
35 | | - |
36 | | - /** |
37 | | - * No LSB in pre-5.3 PHP *sigh*. |
38 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
39 | | - */ |
40 | 31 | public static function staticInit( Parser &$parser ) { |
41 | 32 | $instance = new self; |
42 | 33 | return $instance->init( $parser ); |
Index: trunk/extensions/Livelets/Livelets.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 | + 'live' => array( 0, 'live' ), |
| 12 | +); |
Property changes on: trunk/extensions/Livelets/Livelets.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/Livelets/Livelets.php |
— | — | @@ -9,8 +9,13 @@ |
10 | 10 | * Started: 2007-10-06 |
11 | 11 | * 1.0: 2010-08-25 |
12 | 12 | */ |
13 | | -define( 'LIVELETS_VERSION', '1.0.4, 2010-09-05' ); |
14 | 13 | |
| 14 | +if( !defined( 'MEDIAWIKI' ) ) { |
| 15 | + die( 'This is not a valid entry point to MediaWiki.' ); |
| 16 | +} |
| 17 | + |
| 18 | +define( 'LIVELETS_VERSION', '1.1.0, 2012-01-18' ); |
| 19 | + |
15 | 20 | # the parser-function name for doing live-transclusions |
16 | 21 | $wgLiveletsMagic = 'live'; |
17 | 22 | |
— | — | @@ -29,7 +34,9 @@ |
30 | 35 | ); |
31 | 36 | $dir = dirname( __FILE__ ); |
32 | 37 | $wgExtensionMessagesFiles['Livelets'] = "$dir/Livelets.i18n.php"; |
| 38 | +$wgExtensionMessagesFiles['LiveletsMagic'] = "$dir/Livelets.i18n.magic.php"; |
33 | 39 | |
| 40 | +// @todo FIXME: Move class to a separate file. |
34 | 41 | class Livelets { |
35 | 42 | |
36 | 43 | var $container_id = 0; |
— | — | @@ -38,9 +45,6 @@ |
39 | 46 | function __construct() { |
40 | 47 | global $wgHooks, $wgExtensionFunctions; |
41 | 48 | |
42 | | - # Activate the parser-function |
43 | | - $wgHooks['LanguageGetMagic'][] = $this; |
44 | | - |
45 | 49 | # Call the setup method at extension setup time |
46 | 50 | $wgExtensionFunctions[] = array( $this, 'setup' ); |
47 | 51 | |
— | — | @@ -55,7 +59,6 @@ |
56 | 60 | |
57 | 61 | # Add a hook to replace the wikitext with just the requested livelet's content |
58 | 62 | $wgHooks['ArticleAfterFetchContent'][] = $this; |
59 | | - |
60 | 63 | } |
61 | 64 | } |
62 | 65 | |
— | — | @@ -74,10 +77,7 @@ |
75 | 78 | $wgOut->addHTML("<object type=\"application/x-shockwave-flash\" data=\"$swf\" width=\"1\" height=\"1\"> |
76 | 79 | <param name=\"movie\" value=\"$swf\" /><param name=\"bgcolor\" value=\"$wgLiveletsSwfBg\"/></object>"); |
77 | 80 | } |
78 | | - |
79 | 81 | } |
80 | | - |
81 | | - |
82 | 82 | # Render livelet container |
83 | 83 | function renderContainer( &$parser ) { |
84 | 84 | global $wgTitle, $wgJsMimeType, $wgLiveletsDefaultContent; |
— | — | @@ -114,7 +114,6 @@ |
115 | 115 | return true; |
116 | 116 | } |
117 | 117 | |
118 | | - |
119 | 118 | # Extract recursive braces belonging to templates and parserfunctions |
120 | 119 | function examineBraces( &$content ) { |
121 | 120 | $braces = array(); |
— | — | @@ -137,17 +136,7 @@ |
138 | 137 | } |
139 | 138 | return $braces; |
140 | 139 | } |
141 | | - |
142 | | - |
143 | | - # Set up magic word |
144 | | - function onLanguageGetMagic( &$magicWords, $langCode = 0 ) { |
145 | | - global $wgLiveletsMagic; |
146 | | - $magicWords[$wgLiveletsMagic] = array( $langCode, $wgLiveletsMagic ); |
147 | | - return true; |
148 | | - } |
149 | 140 | } |
150 | 141 | |
151 | 142 | # Instantiate a global instance of the extension |
152 | 143 | $wgLivelets = new Livelets(); |
153 | | - |
154 | | - |
Index: trunk/extensions/LogoFunctions/LogoFunctions.php |
— | — | @@ -27,9 +27,9 @@ |
28 | 28 | |
29 | 29 | // internationalization |
30 | 30 | $wgExtensionMessagesFiles['LogoFunctions'] = $dir . 'LogoFunctions.i18n.php'; |
| 31 | +$wgExtensionMessagesFiles['LogoFunctionsMagic'] = $dir . 'LogoFunctions.i18n.magic.php'; |
31 | 32 | |
32 | 33 | $wgHooks['ParserFirstCallInit'][] = 'efLogoFunctions_Setup'; |
33 | | -$wgHooks['LanguageGetMagic'][] = 'efLogoFunctions_Magic'; |
34 | 34 | |
35 | 35 | function efLogoFunctions_Setup( &$parser ) { |
36 | 36 | $parser->setFunctionHook( 'setlogo', 'efSetLogo_Render' ); |
— | — | @@ -37,15 +37,6 @@ |
38 | 38 | return true; |
39 | 39 | } |
40 | 40 | |
41 | | -/** |
42 | | - * @todo: i18n the magic word |
43 | | -*/ |
44 | | -function efLogoFunctions_Magic( &$magicWords, $langCode ) { |
45 | | - $magicWords['setlogo'] = array( 0, 'setlogo' ); |
46 | | - $magicWords['getlogo'] = array( 0, 'getlogo' ); |
47 | | - return true; |
48 | | -} |
49 | | - |
50 | 41 | function efSetLogo_Render( $parser, $logo = '' ) { |
51 | 42 | global $wgLogo; |
52 | 43 | $imageobj = wfFindFile( $logo ); |
Index: trunk/extensions/LogoFunctions/LogoFunctions.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 | + 'getlogo' => array( 0, 'getlogo' ), |
| 12 | + 'setlogo' => array( 0, 'setlogo' ), |
| 13 | +); |
Property changes on: trunk/extensions/LogoFunctions/LogoFunctions.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 14 | + native |
Added: svn:keywords |
2 | 15 | + Id |
Index: trunk/extensions/Notificator/Notificator.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 | + 'notificator' => array( 0, 'notificator' ), |
| 12 | +); |
Property changes on: trunk/extensions/Notificator/Notificator.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/Notificator/Notificator.php |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | 'path' => __FILE__, // Magic so that svn revision number can be shown |
11 | 11 | 'name' => 'Notificator', |
12 | 12 | 'descriptionmsg' => 'notificator-desc', |
13 | | - 'version' => '1.1', |
| 13 | + 'version' => '1.2', |
14 | 14 | 'author' => 'Patrick Nagel', |
15 | 15 | 'url' => "http://www.mediawiki.org/wiki/Extension:Notificator", |
16 | 16 | ); |
— | — | @@ -21,12 +21,12 @@ |
22 | 22 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'notificator_AddDatabaseTable'; |
23 | 23 | $wgHooks['ParserTestTables'][] = 'notificator_ParserTestTables'; |
24 | 24 | $wgHooks['ParserFirstCallInit'][] = 'notificator_Setup'; |
25 | | -$wgHooks['LanguageGetMagic'][] = 'notificator_Magic'; |
26 | 25 | |
27 | 26 | $wgSpecialPages['Notificator'] = 'SpecialNotificator'; |
28 | 27 | |
29 | 28 | $wgExtensionMessagesFiles['Notificator'] = $dir . '/Notificator.i18n.php'; |
30 | 29 | $wgExtensionMessagesFiles['NotificatorAlias'] = $dir . '/Notificator.alias.php'; |
| 30 | +$wgExtensionMessagesFiles['NotificatorMagic'] = $dir . '/Notificator.i18n.magic.php'; |
31 | 31 | |
32 | 32 | // Setting default here, to avoid register_globals vulnerabilites |
33 | 33 | $ngFromAddress = $wgPasswordSenderName . '<' . $wgPasswordSender . '>'; |
— | — | @@ -40,16 +40,11 @@ |
41 | 41 | } |
42 | 42 | |
43 | 43 | function notificator_ParserTestTables( &$tables ) { |
44 | | - $tables[] = 'notificator'; |
45 | | - return true; |
| 44 | + $tables[] = 'notificator'; |
| 45 | + return true; |
46 | 46 | } |
47 | 47 | |
48 | 48 | function notificator_Setup( &$parser ) { |
49 | 49 | $parser->setFunctionHook( 'notificator', 'Notificator::notificator_Render' ); |
50 | 50 | return true; |
51 | 51 | } |
52 | | - |
53 | | -function notificator_Magic( &$magicWords, $langCode ) { |
54 | | - $magicWords['notificator'] = array( 0, 'notificator' ); |
55 | | - return true; |
56 | | -} |
Index: trunk/extensions/HeaderTabs/HeaderTabs.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 | + 'switchtablink' => array( 0, 'switchtablink' ), |
| 12 | +); |
Property changes on: trunk/extensions/HeaderTabs/HeaderTabs.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/HeaderTabs/HeaderTabs.php |
— | — | @@ -30,6 +30,14 @@ |
31 | 31 | |
32 | 32 | // Translations |
33 | 33 | $wgExtensionMessagesFiles['HeaderTabs'] = $dir . '/HeaderTabs.i18n.php'; |
| 34 | +//! @todo implement in tab parsing code instead... but problems like nowiki (2011-12-12, ofb) |
| 35 | +// if you make them here, it will be article wide instead of tab-wide |
| 36 | +// __NOTABTOC__, __TABTOC__, __NOEDITTAB__ |
| 37 | +// and one day with a special page: __NEWTABLINK__, __NONEWTABLINK__ |
| 38 | +// and one day if we can force toc generation: __FORCETABTOC__ |
| 39 | +//! @todo make this load a custom name from i18n file (2011-12-12, ofb) |
| 40 | +// ensure to keep this name too for backwards compat |
| 41 | +$wgExtensionMessagesFiles['HeaderTabsMagic'] = $dir . '/HeaderTabs.i18n.magic.php'; |
34 | 42 | |
35 | 43 | // Config |
36 | 44 | $htUseHistory = true; |
— | — | @@ -71,7 +79,6 @@ |
72 | 80 | |
73 | 81 | // used by both jQuery and YUI |
74 | 82 | $wgHooks['ParserFirstCallInit'][] = 'headerTabsParserFunctions'; |
75 | | -$wgHooks['LanguageGetMagic'][] = 'headerTabsLanguageGetMagic'; |
76 | 83 | $wgHooks['BeforePageDisplay'][] = 'HeaderTabs::addHTMLHeader'; |
77 | 84 | $wgHooks['ParserAfterTidy'][] = 'HeaderTabs::replaceFirstLevelHeaders'; |
78 | 85 | |
— | — | @@ -95,33 +102,15 @@ |
96 | 103 | 'localBasePath' => dirname( __FILE__ ), |
97 | 104 | 'remoteExtPath' => 'HeaderTabs', |
98 | 105 | ); |
99 | | - |
100 | 106 | } else { // if ! $useJQuery |
101 | 107 | $wgAutoloadClasses['HeaderTabs'] = "$dir/HeaderTabs_body.yui.php"; |
102 | 108 | } |
103 | 109 | |
104 | 110 | # Parser function to insert a link changing a tab: |
105 | 111 | function headerTabsParserFunctions( $parser ) { |
106 | | - |
107 | 112 | //! @todo make this load a custom name from i18n file (2011-12-12, ofb) |
108 | 113 | // ensure to keep this name too for backwards compat |
109 | 114 | $parser->setHook( 'headertabs', array( 'HeaderTabs', 'tag' ) ); |
110 | 115 | $parser->setFunctionHook( 'switchtablink', array( 'HeaderTabs', 'renderSwitchTabLink' ) ); |
111 | 116 | return true; |
112 | 117 | } |
113 | | - |
114 | | -function headerTabsLanguageGetMagic( &$magicWords, $langCode = "en" ) { |
115 | | - //! @todo implement in tab parsing code instead... but problems like nowiki (2011-12-12, ofb) |
116 | | - // if you make them here, it will be article wide instead of tab-wide |
117 | | - // __NOTABTOC__, __TABTOC__, __NOEDITTAB__ |
118 | | - // and one day with a special page: __NEWTABLINK__, __NONEWTABLINK__ |
119 | | - // and one day if we can force toc generation: __FORCETABTOC__ |
120 | | - |
121 | | - //! @todo make this load a custom name from i18n file (2011-12-12, ofb) |
122 | | - // ensure to keep this name too for backwards compat |
123 | | - switch ( $langCode ) { |
124 | | - default: |
125 | | - $magicWords['switchtablink'] = array ( 0, 'switchtablink' ); |
126 | | - } |
127 | | - return true; |
128 | | -} |
Index: trunk/extensions/IncludeWP/IncludeWP.php |
— | — | @@ -1,5 +1,4 @@ |
2 | 2 | <?php |
3 | | - |
4 | 3 | /** |
5 | 4 | * Initialization file for the Include WP extension. |
6 | 5 | * |
— | — | @@ -55,12 +54,12 @@ |
56 | 55 | $egIncWPScriptPath = $wgExtensionAssetsPath === false ? $wgScriptPath . '/extensions/IncludeWP' : $wgExtensionAssetsPath . '/IncludeWP'; |
57 | 56 | |
58 | 57 | $wgExtensionMessagesFiles['IncludeWP'] = dirname( __FILE__ ) . '/IncludeWP.i18n.php'; |
| 58 | +$wgExtensionMessagesFiles['IncludeWPMagic'] = dirname( __FILE__ ) . '/IncludeWP.i18n.magic.php'; |
59 | 59 | |
60 | 60 | $wgAutoloadClasses['IncludeWP'] = dirname( __FILE__ ) . '/IncludeWP.class.php'; |
61 | 61 | $wgAutoloadClasses['ApiIncludeWP'] = dirname( __FILE__ ) . '/api/ApiIncludeWP.php'; |
62 | 62 | |
63 | 63 | $wgHooks['ParserFirstCallInit'][] = 'IncludeWP::staticInit'; |
64 | | -$wgHooks['LanguageGetMagic'][] = 'IncludeWP::staticMagic'; |
65 | 64 | |
66 | 65 | $wgAPIModules['includewp'] = 'ApiIncludeWP'; |
67 | 66 | |
Index: trunk/extensions/IncludeWP/IncludeWP.class.php |
— | — | @@ -15,20 +15,9 @@ |
16 | 16 | * @copyright © 2008 James McCormack, preceding version Martin Schallnahs, original Rob Church |
17 | 17 | */ |
18 | 18 | final class IncludeWP extends ParserHook { |
19 | | - |
20 | 19 | /** |
21 | 20 | * No LSB in pre-5.3 PHP *sigh*. |
22 | 21 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
23 | | - */ |
24 | | - public static function staticMagic( array &$magicWords, $langCode ) { |
25 | | - $className = __CLASS__; |
26 | | - $instance = new $className(); |
27 | | - return $instance->magic( $magicWords, $langCode ); |
28 | | - } |
29 | | - |
30 | | - /** |
31 | | - * No LSB in pre-5.3 PHP *sigh*. |
32 | | - * This is to be refactored as soon as php >=5.3 becomes acceptable. |
33 | 22 | */ |
34 | 23 | public static function staticInit( Parser &$parser ) { |
35 | 24 | $className = __CLASS__; |
Index: trunk/extensions/IncludeWP/IncludeWP.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 | + 'IncludeWP' => array( 0, 'includewp' ), |
| 12 | +); |
Property changes on: trunk/extensions/IncludeWP/IncludeWP.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/LiveTranslate/LiveTranslate.php |
— | — | @@ -75,7 +75,6 @@ |
76 | 76 | $wgHooks['ArticleViewHeader'][] = 'LiveTranslateHooks::onArticleViewHeader'; |
77 | 77 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'LiveTranslateHooks::onSchemaUpdate'; |
78 | 78 | $wgHooks['ArticleSaveComplete'][] = 'LiveTranslateHooks::onArticleSaveComplete'; |
79 | | -$wgHooks['LanguageGetMagic'][] = 'LiveTranslateHooks::addMagicWords'; |
80 | 79 | $wgHooks['InternalParseBeforeLinks'][] = 'LiveTranslateHooks::stripMagicWords'; |
81 | 80 | $wgHooks['OutputPageParserOutput'][] = 'LiveTranslateHooks::onOutputPageParserOutput'; |
82 | 81 | |
Index: trunk/extensions/LiveTranslate/LiveTranslate.hooks.php |
— | — | @@ -295,27 +295,6 @@ |
296 | 296 | } |
297 | 297 | |
298 | 298 | /** |
299 | | - * Registers the magic words to show and hide the translation control. |
300 | | - * |
301 | | - * TODO: apparently there is some new way of doing this for quite a while, |
302 | | - * which is not linked in the docs. If someone cares to explain the new stuff, |
303 | | - * I'll be happy to update this. |
304 | | - * |
305 | | - * @since 0.6 |
306 | | - * |
307 | | - * @param array &$magicWords |
308 | | - * @param string $langCode |
309 | | - * |
310 | | - * @return true |
311 | | - */ |
312 | | - public static function addMagicWords( array &$magicWords, $langCode ) { |
313 | | - $magicWords['LT_NOTRANSLATIONCONTROL'] = array( 0, '__NOTRANSLATIONCONTROL__' ); |
314 | | - $magicWords['LT_SHOWTRANSLATIONCONTROL'] =array( 0, '__SHOWTRANSLATIONCONTROL__' ); |
315 | | - |
316 | | - return true; |
317 | | - } |
318 | | - |
319 | | - /** |
320 | 299 | * Strips the magic words added by Live Translate from the page text. |
321 | 300 | * |
322 | 301 | * @since 0.6 |
Index: trunk/extensions/Lua/Lua.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 | + 'luaexpr' => array( 0, 'luaexpr' ), |
| 12 | +); |
Property changes on: trunk/extensions/Lua/Lua.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/Lua/Lua.php |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | |
20 | 20 | $dir = dirname(__FILE__) . '/'; |
21 | 21 | $wgExtensionMessagesFiles['Lua'] = $dir . 'Lua.i18n.php'; |
| 22 | +$wgExtensionMessagesFiles['LuaMagic'] = $dir . 'Lua.i18n.magic.php'; |
22 | 23 | $wgAutoloadClasses['LuaHooks'] = $dir . 'Lua.hooks.php'; |
23 | 24 | $wgAutoloadClasses['LuaError'] = $dir . 'Lua.wrapper.php'; |
24 | 25 | $wgAutoloadClasses['LuaWrapper'] = $dir . 'Lua.wrapper.php'; |
— | — | @@ -31,5 +32,4 @@ |
32 | 33 | |
33 | 34 | |
34 | 35 | $wgHooks['ParserFirstCallInit'][] = 'LuaHooks::parserInit'; |
35 | | -$wgHooks['LanguageGetMagic'][] = 'LuaHooks::magic'; |
36 | 36 | $wgHooks['ParserBeforeTidy'][] = 'LuaHooks::beforeTidy'; |
Index: trunk/extensions/Lua/Lua.hooks.php |
— | — | @@ -16,12 +16,6 @@ |
17 | 17 | return true; |
18 | 18 | } |
19 | 19 | |
20 | | - /** LanguageGetMagic hook */ |
21 | | - public static function magic(&$magicWords, $langCode) { |
22 | | - $magicWords['luaexpr'] = array(0, 'luaexpr'); |
23 | | - return true; |
24 | | - } |
25 | | - |
26 | 20 | /** ParserBeforeTidy hook */ |
27 | 21 | public static function beforeTidy(&$parser, &$text) { |
28 | 22 | global $wgLua; |
Index: trunk/extensions/Interlanguage/InterlanguageExtension.php |
— | — | @@ -25,23 +25,12 @@ |
26 | 26 | */ |
27 | 27 | |
28 | 28 | class InterlanguageExtension { |
29 | | - |
30 | 29 | /** |
31 | 30 | * @var DatabaseBase |
32 | 31 | */ |
33 | 32 | var $foreignDbr = false; |
34 | 33 | |
35 | 34 | /** |
36 | | - * @param $magicWords array |
37 | | - * @param $langCode string |
38 | | - * @return bool |
39 | | - */ |
40 | | - function onLanguageGetMagic( &$magicWords, $langCode ) { |
41 | | - $magicWords['interlanguage'] = array(0, 'interlanguage'); |
42 | | - return true; |
43 | | - } |
44 | | - |
45 | | - /** |
46 | 35 | * The meat of the extension, the function that handles {{interlanguage:}} magic. |
47 | 36 | * |
48 | 37 | * @param $parser Parser standard Parser object. |
Index: trunk/extensions/LabeledSectionTransclusion/lst.php |
— | — | @@ -22,6 +22,8 @@ |
23 | 23 | ## |
24 | 24 | |
25 | 25 | $wgHooks['ParserFirstCallInit'][] = 'LabeledSectionTransclusion::setup'; |
| 26 | +// @todo FIXME: LanguageGetMagic is obsolete, but LabeledSectionTransclusion::setupMagic() |
| 27 | +// contains magic hack that $magicWords cannot handle. |
26 | 28 | $wgHooks['LanguageGetMagic'][] = 'LabeledSectionTransclusion::setupMagic'; |
27 | 29 | |
28 | 30 | $wgExtensionCredits['parserhook'][] = array( |
— | — | @@ -37,8 +39,8 @@ |
38 | 40 | // Must be set now to avoid injection via register_globals |
39 | 41 | $wgLstLocal = null; |
40 | 42 | |
| 43 | +// @todo FIXME: move to a separate file. |
41 | 44 | class LabeledSectionTransclusion { |
42 | | - |
43 | 45 | static function setup( $parser ) { |
44 | 46 | $parser->setHook( 'section', array( __CLASS__, 'noop' ) ); |
45 | 47 | $parser->setFunctionHook( 'lst', array( __CLASS__, 'pfuncIncludeObj' ), SFH_OBJECT_ARGS ); |
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -230,6 +230,7 @@ |
231 | 231 | $wgAutoloadClasses['mvOggHandler'] = dirname( __FILE__ ) . '/MV_OggHandler.php'; |
232 | 232 | $wgMediaHandlers['application/ogg']='mvOggHandler'; |
233 | 233 | $wgParserOutputHooks['OggHandler'] = array( 'mvOggHandler', 'outputHook' ); |
| 234 | + // @todo FIXME: LanguageGetMagic is deprecated. Need to find another solution. |
234 | 235 | foreach($wgHooks['LanguageGetMagic'] as & $hook_function){ |
235 | 236 | if($hook_function=='OggHandler::registerMagicWords'){ |
236 | 237 | $hook_function='mvOggHandler::registerMagicWords'; |
— | — | @@ -267,6 +268,7 @@ |
268 | 269 | ); |
269 | 270 | } |
270 | 271 | # Define a setup function |
| 272 | +// @todo FIXME LanguageGetMagic is deprecated. Need to find another solution. |
271 | 273 | # Add a hook to initialize the magic word |
272 | 274 | $wgHooks['LanguageGetMagic'][] = 'mvMagicParserFunction_Magic'; |
273 | 275 | |
Index: trunk/extensions/IndexFunction/IndexFunction.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 | + 'index-func' => array( 0, 'index' ), |
| 12 | +); |
Property changes on: trunk/extensions/IndexFunction/IndexFunction.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/IndexFunction/IndexFunction_body.php |
— | — | @@ -183,13 +183,6 @@ |
184 | 184 | return true; |
185 | 185 | } |
186 | 186 | |
187 | | - // Register the function name |
188 | | - static function addIndexFunction( &$magicWords, $langCode ) { |
189 | | - $magicWords['index-func'] = array( 0, 'index' ); |
190 | | - |
191 | | - return true; |
192 | | - } |
193 | | - |
194 | 187 | // Function called to render the parser function |
195 | 188 | // Output is an empty string unless there are errors |
196 | 189 | static function indexRender( &$parser ) { |
Index: trunk/extensions/IndexFunction/IndexFunction.php |
— | — | @@ -13,7 +13,6 @@ |
14 | 14 | |
15 | 15 | # Register function |
16 | 16 | $wgHooks['ParserFirstCallInit'][] = 'efIndexSetup'; |
17 | | -$wgHooks['LanguageGetMagic'][] = 'IndexFunctionHooks::addIndexFunction'; |
18 | 17 | # Add to database |
19 | 18 | $wgHooks['OutputPageParserOutput'][] = 'IndexFunctionHooks::doIndexes'; |
20 | 19 | # Make links to indexes blue |
— | — | @@ -41,6 +40,7 @@ |
42 | 41 | # i18n |
43 | 42 | $wgExtensionMessagesFiles['IndexFunctionAlias'] = $dir . 'IndexFunction.alias.php'; |
44 | 43 | $wgExtensionMessagesFiles['IndexFunction'] = $dir . 'IndexFunction.i18n.php'; |
| 44 | +$wgExtensionMessagesFiles['IndexFunctionMagic'] = $dir . 'IndexFunction.i18n.magic.php'; |
45 | 45 | |
46 | 46 | # Register classes with the autoloader |
47 | 47 | $wgAutoloadClasses['SpecialIndex'] = $dir . 'SpecialIndex.php'; |
Index: trunk/extensions/InteractiveBlockMessage/InteractiveBlockMessage.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 | + 'USERBLOCKED' => array( 1, 'USERBLOCKED' ), |
| 12 | +); |
Property changes on: trunk/extensions/InteractiveBlockMessage/InteractiveBlockMessage.i18n.magic.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Added: svn:keywords |
2 | 14 | + Id |
Index: trunk/extensions/InteractiveBlockMessage/InteractiveBlockMessage.php |
— | — | @@ -28,7 +28,7 @@ |
29 | 29 | $wgAutoloadClasses['InteractiveBlockMessageHooks'] = "$dir/InteractiveBlockMessageHooks.php"; |
30 | 30 | |
31 | 31 | $wgExtensionMessagesFiles['InteractiveBlockMessage'] = "$dir/InteractiveBlockMessage.i18n.php"; |
| 32 | +$wgExtensionMessagesFiles['InteractiveBlockMessageMagic'] = "$dir/InteractiveBlockMessage.i18n.magic.php"; |
32 | 33 | |
33 | | -$wgHooks['LanguageGetMagic'][] = 'InteractiveBlockMessageHooks::magicWordVar'; |
34 | 34 | $wgHooks['MagicWordwgVariableIDs'][] = 'InteractiveBlockMessageHooks::magicWordSet'; |
35 | 35 | $wgHooks['ParserGetVariableValueSwitch'][] = 'InteractiveBlockMessageHooks::parserGetVariable'; |
Index: trunk/extensions/InteractiveBlockMessage/InteractiveBlockMessageHooks.php |
— | — | @@ -7,16 +7,6 @@ |
8 | 8 | */ |
9 | 9 | class InteractiveBlockMessageHooks { |
10 | 10 | /** |
11 | | - * @param $magicWords array |
12 | | - * @param $ln string (language) |
13 | | - * @return bool |
14 | | - */ |
15 | | - public static function magicWordVar( array &$magicWords, $ln ) { |
16 | | - $magicWords['USERBLOCKED'] = array( 1, 'USERBLOCKED' ); |
17 | | - return true; |
18 | | - } |
19 | | - |
20 | | - /** |
21 | 11 | * @param $vars array |
22 | 12 | * @return bool |
23 | 13 | */ |