/**
* Contain a class for special pages
* @file
- * @ingroup SpecialPages
+ * @ingroup SpecialPage
*/
/**
* Setting this to return true will ensure formatResult() is called
* one more time to make sure that the very last result is formatted
* as well.
+ * @return bool
*/
function tryLastResult() {
return false;
*
* @param $limit Integer: limit for SQL statement
* @param $ignoreErrors Boolean: whether to ignore database errors
+ * @return bool|int
*/
function recache( $limit, $ignoreErrors = true ) {
if ( !$this->isCacheable() ) {
$res = $this->reallyDoQuery( $limit, false );
$num = false;
if ( $res ) {
- $num = $dbr->numRows( $res );
+ $num = $res->numRows();
# Fetch results
$vals = array();
while ( $res && $row = $dbr->fetchObject( $res ) ) {
/**
* Somewhat deprecated, you probably want to be using execute()
+ * @return ResultWrapper
*/
function doQuery( $offset = false, $limit = false ) {
if ( $this->isCached() && $this->isCacheable() ) {
/**
* This is the actual workhorse. It does everything needed to make a
* real, honest-to-gosh query page.
+ * @return int
*/
function execute( $par ) {
global $wgQueryCacheLimit, $wgDisableQueryPageUpdate;
/**
* Similar to above, but packaging in a syndicated feed instead of a web page
+ * @return bool
*/
function doFeed( $class = '', $limit = 50 ) {
global $wgFeed, $wgFeedClasses;
/**
* Override for custom handling. If the titles/links are ok, just do
* feedItemDesc()
+ * @return FeedItem|null
*/
function feedResult( $row ) {
if ( !isset( $row->title ) ) {
* Cache page existence for performance
*/
function preprocessResults( $db, $res ) {
+ if ( !$res->numRows() ) {
+ return;
+ }
+
$batch = new LinkBatch;
foreach ( $res as $row ) {
$batch->add( $row->namespace, $row->title );
$batch->execute();
// Back to start for display
- if ( $db->numRows( $res ) > 0 )
- // If there are no rows we get an error seeking.
- $db->dataSeek( $res, 0 );
+ $res->seek( 0 );
}
/**
* kluge for Special:WantedFiles, which may contain false
* positives for files that exist e.g. in a shared repo (bug
* 6220).
+ * @return bool
*/
function forceExistenceCheck() {
return false;