Index: trunk/extensions/NetworkAuth/NetworkAuth.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | ); |
22 | 22 | |
23 | 23 | $wgExtensionFunctions[] = 'efNetworkAuth_Setup'; |
| 24 | +$wgExtensionMessagesFiles['NetworkAuth'] = dirname(__FILE__) . '/' 'NetworkAuth.i18n.php'; |
24 | 25 | |
25 | 26 | function efNetworkAuth_Setup() { |
26 | 27 | global $wgRequest; |
— | — | @@ -35,13 +36,6 @@ |
36 | 37 | } |
37 | 38 | } |
38 | 39 | |
39 | | - #Add Messages |
40 | | - global $wgMessageCache; |
41 | | - require( dirname( __FILE__ ) . '/NetworkAuth.i18n.php' ); |
42 | | - foreach( $messages as $key => $value ) { |
43 | | - $wgMessageCache->addMessages( $messages[$key], $key ); |
44 | | - } |
45 | | - |
46 | 40 | efNetworkAuth_Authenticate(); |
47 | 41 | |
48 | 42 | return true; |
— | — | @@ -160,6 +154,10 @@ |
161 | 155 | |
162 | 156 | function efNetworkAuth_PersonalUrls($personal_urls, $title) { |
163 | 157 | global $wgNetworkAuthUser, $wgNetworkAuthHost; |
| 158 | + |
| 159 | + // Lazy load the i18n stuff here |
| 160 | + wfLoadExtensionMessages('NetworkAuth'); |
| 161 | + |
164 | 162 | if (isset($personal_urls['anonuserpage'])) { |
165 | 163 | $personal_urls['anonuserpage']['text'] = |
166 | 164 | wfMsg('networkauth-purltext', $wgNetworkAuthUser, $wgNetworkAuthHost); |