http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88505

Revision: 88505
Author:   preilly
Date:     2011-05-21 00:28:53 +0000 (Sat, 21 May 2011)
Log Message:
-----------
fix use of globals and switch to using getDir method

Modified Paths:
--------------
    trunk/extensions/PatchOutputMobile/PatchOutputMobile.php

Modified: trunk/extensions/PatchOutputMobile/PatchOutputMobile.php
===================================================================
--- trunk/extensions/PatchOutputMobile/PatchOutputMobile.php    2011-05-21 
00:15:14 UTC (rev 88504)
+++ trunk/extensions/PatchOutputMobile/PatchOutputMobile.php    2011-05-21 
00:28:53 UTC (rev 88505)
@@ -27,7 +27,7 @@
                                                                                
        'onOutputPageBeforeHTML' );
 
 class ExtPatchOutputMobile {
-       const VERSION = '0.3.1';
+       const VERSION = '0.3.2';
 
        private $doc;
        
@@ -72,6 +72,7 @@
        );
 
        public function onOutputPageBeforeHTML( &$out, &$text ) {
+               global $wgContLang;
                // Need to stash the results of the "wfMsg" call before the 
Output Buffering handler
                // because at this point the database connection is shut down, 
etc.
                ExtPatchOutputMobile::$messages['patch-output-mobile-show'] = 
wfMsg( 'show_button' );
@@ -82,8 +83,8 @@
                ExtPatchOutputMobile::$messages['copyright'] = wfMsg( 
'copyright' );
                ExtPatchOutputMobile::$messages['home_button'] = wfMsg( 
'home_button' );
                ExtPatchOutputMobile::$messages['random_button'] = wfMsg( 
'random_button' );
-               ExtPatchOutputMobile::$dir = $GLOBALS['wgContLang']->isRTL()  ? 
"rtl" : "ltr";
-               ExtPatchOutputMobile::$code = $GLOBALS['wgContLang']->getCode();
+               ExtPatchOutputMobile::$dir = $wgContLang->getDir();
+               ExtPatchOutputMobile::$code = $wgContLang->getCode();
                
                $userAgent = $_SERVER['HTTP_USER_AGENT'];
                $acceptHeader = $_SERVER["HTTP_ACCEPT"];


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to