Followup comment to r81507. The api is using a legacy langlinks method no modern...
[lhc/web/wiklou.git] / includes / api / ApiQueryRandom.php
index bcef77a..716269b 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 /**
- * Created on Monday, January 28, 2008
  *
- * API for MediaWiki 1.8+
+ *
+ * Created on Monday, January 28, 2008
  *
  * Copyright © 2008 Brent Garber
  *
@@ -21,6 +21,8 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
  */
 
 if ( !defined( 'MEDIAWIKI' ) ) {
@@ -64,7 +66,6 @@ if ( !defined( 'MEDIAWIKI' ) ) {
        }
 
        protected function runQuery( &$resultPageSet ) {
-               $db = $this->getDB();
                $res = $this->select( __METHOD__ );
                $count = 0;
                foreach ( $res as $row ) {
@@ -120,6 +121,10 @@ if ( !defined( 'MEDIAWIKI' ) ) {
                return $vals;
        }
 
+       public function getCacheMode( $params ) {
+               return 'public';
+       }
+
        public function getAllowedParams() {
                return array(
                        'namespace' => array(
@@ -161,4 +166,4 @@ if ( !defined( 'MEDIAWIKI' ) ) {
        public function getVersion() {
                return __CLASS__ . ': $Id: ApiQueryRandom.php overlordq$';
        }
-}
\ No newline at end of file
+}