reimplement r73652 having actually read coding conventions this time
[lhc/web/wiklou.git] / includes / api / ApiQueryCategories.php
index ea1e6e8..2e2b00a 100644 (file)
@@ -1,10 +1,9 @@
 <?php
-
 /**
- * Created on May 13, 2007
- *
  * API for MediaWiki 1.8+
  *
+ * Created on May 13, 2007
+ *
  * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
  *
  * This program is free software; you can redistribute it and/or modify
@@ -21,6 +20,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' ) ) {
@@ -43,6 +44,10 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
                $this->run();
        }
 
+       public function getCacheMode( $params ) {
+               return 'public';
+       }
+
        public function executeGenerator( $resultPageSet ) {
                $this->run( $resultPageSet );
        }
@@ -125,7 +130,6 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
                        $this->addOption( 'ORDER BY', "cl_from, cl_to" );
                }
 
-               $db = $this->getDB();
                $res = $this->select( __METHOD__ );
 
                if ( is_null( $resultPageSet ) ) {
@@ -225,7 +229,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
        public function getDescription() {
                return 'List all categories the page(s) belong to';
        }
-       
+
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
                        array( 'show' ),