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

Revision: 99114
Author:   jeroendedauw
Date:     2011-10-06 16:11:44 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
mw 1.18 compat fix

Modified Paths:
--------------
    trunk/extensions/Contest/includes/ContestantPager.php

Modified: trunk/extensions/Contest/includes/ContestantPager.php
===================================================================
--- trunk/extensions/Contest/includes/ContestantPager.php       2011-10-06 
16:07:20 UTC (rev 99113)
+++ trunk/extensions/Contest/includes/ContestantPager.php       2011-10-06 
16:11:44 UTC (rev 99114)
@@ -25,6 +25,30 @@
                
                $this->getOutput()->addModules( 'contest.contestant.pager' );
        }
+       
+       /**
+        * Get the OutputPage being used for this instance.
+        * IndexPager extends ContextSource as of 1.19. 
+        *
+        * @since 0.1
+        *
+        * @return OutputPage
+        */
+       public function getOutput() {
+               return version_compare( $GLOBALS['wgVersion'], '1.19', '>=' ) ? 
parent::getOutput() : $GLOBALS['wgOut'];
+       }
+       
+       /**
+        * Get the Language being used for this instance.
+        * IndexPager extends ContextSource as of 1.19. 
+        *
+        * @since 0.1
+        *
+        * @return Language
+        */
+       public function getLang() {
+               return version_compare( $GLOBALS['wgVersion'], '1.19', '>=' ) ? 
parent::getLang() : $GLOBALS['wgLang'];
+       }
 
        public function getFieldNames() {
                static $headers = null;


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to