dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Wrap auto-numbering for section heading in a classed span (bug 33450)"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiQueryRandom.php
diff --git
a/includes/api/ApiQueryRandom.php
b/includes/api/ApiQueryRandom.php
index
51ae0e2
..
ddf5841
100644
(file)
--- a/
includes/api/ApiQueryRandom.php
+++ b/
includes/api/ApiQueryRandom.php
@@
-25,11
+25,6
@@
* @file
*/
* @file
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- // Eclipse helper - will be ignored in production
- require_once( 'ApiQueryBase.php' );
-}
-
/**
* Query module to get list of random pages
*
/**
* Query module to get list of random pages
*
@@
-73,7
+68,11
@@
class ApiQueryRandom extends ApiQueryGeneratorBase {
}
}
}
}
- protected function runQuery( &$resultPageSet ) {
+ /**
+ * @param $resultPageSet ApiPageSet
+ * @return int
+ */
+ protected function runQuery( $resultPageSet = null ) {
$res = $this->select( __METHOD__ );
$count = 0;
foreach ( $res as $row ) {
$res = $this->select( __METHOD__ );
$count = 0;
foreach ( $res as $row ) {
@@
-162,6
+161,16
@@
class ApiQueryRandom extends ApiQueryGeneratorBase {
);
}
);
}
+ public function getResultProperties() {
+ return array(
+ '' => array(
+ 'id' => 'integer',
+ 'ns' => 'namespace',
+ 'title' => 'string'
+ )
+ );
+ }
+
public function getDescription() {
return array(
'Get a set of random pages',
public function getDescription() {
return array(
'Get a set of random pages',
@@
-171,7
+180,7
@@
class ApiQueryRandom extends ApiQueryGeneratorBase {
);
}
);
}
- p
rotected
function getExamples() {
+ p
ublic
function getExamples() {
return 'api.php?action=query&list=random&rnnamespace=0&rnlimit=2';
}
return 'api.php?action=query&list=random&rnnamespace=0&rnlimit=2';
}