/** @var array */
protected $ids;
+ /** @var ResultWrapper|bool */
protected $res;
/** @var bool|object */
/**
* Do the DB query to iterate through the objects.
- * @param DatabaseBase $db DatabaseBase object to use for the query
+ * @param IDatabase $db DB object to use for the query
*/
abstract public function doQuery( $db );
}
/**
- * @param DatabaseBase $db
+ * @param IDatabase $db
* @return mixed
*/
public function doQuery( $db ) {
- $conds = array( 'rev_page' => $this->title->getArticleID() );
+ $conds = [ 'rev_page' => $this->title->getArticleID() ];
if ( $this->ids !== null ) {
$conds['rev_id'] = array_map( 'intval', $this->ids );
}
return $db->select(
- array( 'revision', 'page', 'user' ),
+ [ 'revision', 'page', 'user' ],
array_merge( Revision::selectFields(), Revision::selectUserFields() ),
$conds,
__METHOD__,
- array( 'ORDER BY' => 'rev_id DESC' ),
- array(
+ [ 'ORDER BY' => 'rev_id DESC' ],
+ [
'page' => Revision::pageJoinCond(),
- 'user' => Revision::userJoinCond() )
+ 'user' => Revision::userJoinCond() ]
);
}
return Linker::linkKnown(
$this->list->title,
$date,
- array(),
- array(
+ [],
+ [
'oldid' => $this->revision->getId(),
'unhide' => 1
- )
+ ]
);
}
return Linker::linkKnown(
$this->list->title,
$this->list->msg( 'diff' )->escaped(),
- array(),
- array(
+ [],
+ [
'diff' => $this->revision->getId(),
'oldid' => 'prev',
'unhide' => 1
- )
+ ]
);
}
}