Index: trunk/extensions/PatchOutputMobile/PatchOutputMobile.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | 'onOutputPageBeforeHTML' ); |
29 | 29 | |
30 | 30 | class ExtPatchOutputMobile { |
31 | | - const VERSION = '0.3.1'; |
| 31 | + const VERSION = '0.3.2'; |
32 | 32 | |
33 | 33 | private $doc; |
34 | 34 | |
— | — | @@ -72,6 +72,7 @@ |
73 | 73 | ); |
74 | 74 | |
75 | 75 | public function onOutputPageBeforeHTML( &$out, &$text ) { |
| 76 | + global $wgContLang; |
76 | 77 | // Need to stash the results of the "wfMsg" call before the Output Buffering handler |
77 | 78 | // because at this point the database connection is shut down, etc. |
78 | 79 | ExtPatchOutputMobile::$messages['patch-output-mobile-show'] = wfMsg( 'show_button' ); |
— | — | @@ -82,8 +83,8 @@ |
83 | 84 | ExtPatchOutputMobile::$messages['copyright'] = wfMsg( 'copyright' ); |
84 | 85 | ExtPatchOutputMobile::$messages['home_button'] = wfMsg( 'home_button' ); |
85 | 86 | ExtPatchOutputMobile::$messages['random_button'] = wfMsg( 'random_button' ); |
86 | | - ExtPatchOutputMobile::$dir = $GLOBALS['wgContLang']->isRTL() ? "rtl" : "ltr"; |
87 | | - ExtPatchOutputMobile::$code = $GLOBALS['wgContLang']->getCode(); |
| 87 | + ExtPatchOutputMobile::$dir = $wgContLang->getDir(); |
| 88 | + ExtPatchOutputMobile::$code = $wgContLang->getCode(); |
88 | 89 | |
89 | 90 | $userAgent = $_SERVER['HTTP_USER_AGENT']; |
90 | 91 | $acceptHeader = $_SERVER["HTTP_ACCEPT"]; |