<?php
-
/**
- * Created on July 7, 2007
- *
* API for MediaWiki 1.8+
*
+ * Created on July 7, 2007
+ *
* Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
*
* This program is free software; you can redistribute it and/or modify
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
*/
if ( !defined( 'MEDIAWIKI' ) ) {
$this->run();
}
+ public function getCacheMode( $params ) {
+ return 'public';
+ }
+
public function executeGenerator( $resultPageSet ) {
$this->run( $resultPageSet );
}
$result = $this->getResult();
$count = 0;
- while ( $row = $db->fetchObject( $res ) ) {
+ foreach ( $res as $row ) {
if ( ++ $count > $limit ) {
// We've reached the one extra which shows that there are additional pages to be had. Stop here...
$this->setContinueEnumParameter( 'offset', $offset + $limit );
public function getParamDescription() {
$p = $this->getModulePrefix();
return array(
- 'prop' => 'What pieces of information to include',
+ 'prop' => array(
+ 'What pieces of information to include',
+ ' ids - Adds the id of page',
+ ' title - Adds the title and namespace id of the page',
+ ' url - Adds the URL used in the page',
+ ),
'offset' => 'Used for paging. Use the value returned for "continue"',
'protocol' => array(
"Protocol of the url. If empty and {$p}query set, the protocol is http.",
public function getVersion() {
return __CLASS__ . ': $Id$';
}
-}
\ No newline at end of file
+}