User "Reedy" posted a comment on MediaWiki.r89617.
Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89617#c19174
Commit summary:
* (bug 28695) If there are no results for an abuse filter log, can you put "No
matching items in log" or something similar, as we do for usual logs
Think this is right, not verified
Comment:
Pager Sucks.
<source lang="php">
function getBody() {
if ( !$this->mQueryDone ) {
$this->doQuery();
}
# Don't use any extra rows returned by the query
$numRows = min( $this->mResult->numRows(), $this->mLimit );
</source>
Can you try
<source lang="php">
$pager = new AbuseLogPager( $this, $conds );
$result = $pager->getResult();
if( $result && $result->numRows() !== 0 ) {
</source>
swapped with
<source lang="php">
$pager = new AbuseLogPager( $this, $conds );
$pager->doQuery();
$result = $pager->getResult();
if( $result && $result->numRows() !== 0 ) {
</source>
If that works, I'll explicitly mark the doQuery method in Pager as public
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview