Fix example per r78832 CR
[lhc/web/wiklou.git] / includes / api / ApiQueryLinks.php
index 9e5b75d..65975b2 100644 (file)
@@ -1,9 +1,8 @@
 <?php
-
 /**
- * Created on May 12, 2007
  *
- * API for MediaWiki 1.8+
+ *
+ * Created on May 12, 2007
  *
  * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
  *
@@ -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' ) ) {
@@ -65,6 +66,10 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
                $this->run();
        }
 
+       public function getCacheMode( $params ) {
+               return 'public';
+       }
+
        public function executeGenerator( $resultPageSet ) {
                $this->run( $resultPageSet );
        }
@@ -85,7 +90,7 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
                $this->addTables( $this->table );
                $this->addWhereFld( $this->prefix . '_from', array_keys( $this->getPageSet()->getGoodTitles() ) );
                $this->addWhereFld( $this->prefix . '_namespace', $params['namespace'] );
-               
+
                if ( !is_null( $params[$this->titlesParam] ) ) {
                        $lb = new LinkBatch;
                        foreach ( $params[$this->titlesParam] as $t ) {
@@ -232,4 +237,4 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
-}
\ No newline at end of file
+}