Index: trunk/extensions/ExtTab/includes/ET_Initialize.php |
— | — | @@ -18,54 +18,6 @@ |
19 | 19 | $wgExtensionMessagesFiles['ExtTabMagic'] = $smwgExtTabIP . '/languages/ExtTab.i18n.magic.php'; |
20 | 20 | $wgAutoloadClasses['ETParserFunctions'] = $smwgExtTabIP . '/includes/ET_ParserFunctions.php'; |
21 | 21 | |
22 | | -function smwfExtTabInitMessages() { |
23 | | - global $smwgExtTabMessagesInitialized; |
24 | | - if ( isset( $smwgExtTabMessagesInitialized ) ) return; // prevent double init |
25 | | - |
26 | | - smwfExtTabInitUserMessages(); // lazy init for ajax calls |
27 | | - |
28 | | - $smwgExtTabMessagesInitialized = true; |
29 | | -} |
30 | | -function smwfExtTabInitUserMessages() { |
31 | | - global $wgMessageCache, $smwgExtTabContLang, $wgLanguageCode; |
32 | | - smwfExtTabInitContentLanguage( $wgLanguageCode ); |
33 | | - |
34 | | - global $smwgExtTabIP, $smwgExtTabLang; |
35 | | - if ( !empty( $smwgExtTabLang ) ) { return; } |
36 | | - global $wgMessageCache, $wgLang; |
37 | | - $smwLangClass = 'ET_Language' . str_replace( '-', '_', ucfirst( $wgLang->getCode() ) ); |
38 | | - |
39 | | - if ( file_exists( $smwgExtTabIP . '/languages/' . $smwLangClass . '.php' ) ) { |
40 | | - include_once( $smwgExtTabIP . '/languages/' . $smwLangClass . '.php' ); |
41 | | - } |
42 | | - // fallback if language not supported |
43 | | - if ( !class_exists( $smwLangClass ) ) { |
44 | | - global $smwgExtTabContLang; |
45 | | - $smwgExtTabLang = $smwgExtTabContLang; |
46 | | - } else { |
47 | | - $smwgExtTabLang = new $smwLangClass(); |
48 | | - } |
49 | | - |
50 | | - $wgMessageCache->addMessages( $smwgExtTabLang->getUserMsgArray(), $wgLang->getCode() ); |
51 | | -} |
52 | | -function smwfExtTabInitContentLanguage( $langcode ) { |
53 | | - global $smwgExtTabIP, $smwgExtTabContLang; |
54 | | - if ( !empty( $smwgExtTabContLang ) ) { return; } |
55 | | - |
56 | | - $smwContLangClass = 'ET_Language' . str_replace( '-', '_', ucfirst( $langcode ) ); |
57 | | - |
58 | | - if ( file_exists( $smwgExtTabIP . '/languages/' . $smwContLangClass . '.php' ) ) { |
59 | | - include_once( $smwgExtTabIP . '/languages/' . $smwContLangClass . '.php' ); |
60 | | - } |
61 | | - |
62 | | - // fallback if language not supported |
63 | | - if ( !class_exists( $smwContLangClass ) ) { |
64 | | - include_once( $smwgExtTabIP . '/languages/ET_LanguageEn.php' ); |
65 | | - $smwContLangClass = 'ET_LanguageEn'; |
66 | | - } |
67 | | - $smwgExtTabContLang = new $smwContLangClass(); |
68 | | -} |
69 | | - |
70 | 22 | function smwfExtTabGetAjaxMethodPrefix() { |
71 | 23 | $func_name = isset( $_POST["rs"] ) ? $_POST["rs"] : ( isset( $_GET["rs"] ) ? $_GET["rs"] : NULL ); |
72 | 24 | if ( $func_name == NULL ) return NULL; |
— | — | @@ -80,8 +32,6 @@ |
81 | 33 | global $smwgExtTabIP, $wgExtensionCredits; |
82 | 34 | global $wgParser, $wgHooks, $wgAutoloadClasses; |
83 | 35 | |
84 | | - smwfExtTabInitMessages(); |
85 | | - |
86 | 36 | // register hooks |
87 | 37 | if ( defined( 'MW_SETPORTS_PARSERFIRSTCALLINIT' ) ) { |
88 | 38 | $wgHooks['ParserFirstCallInit'][] = 'ETParserFunctions::registerFunctions'; |