}
if ( $params['user'] !== null || $params['excludeuser'] !== null ) {
- // Paranoia: avoid brute force searches (bug 17342)
+ // Paranoia: avoid brute force searches (T19342)
if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) {
$bitmask = Revision::DELETED_USER;
} elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
$orderby[] = "rev_id $sort";
$this->addOption( 'ORDER BY', $orderby );
- $res = $this->select( __METHOD__ );
+ $hookData = [];
+ $res = $this->select( __METHOD__, [], $hookData );
$pageMap = []; // Maps rev_page to array index
$count = 0;
$nextIndex = 0;
];
ApiResult::setIndexedTagName( $a['revisions'], 'rev' );
ApiQueryBase::addTitleInfo( $a, $title );
- $fit = $result->addValue( [ 'query', $this->getModuleName() ], $index, $a );
+ $fit = $this->processRow( $row, $a['revisions'][0], $hookData ) &&
+ $result->addValue( [ 'query', $this->getModuleName() ], $index, $a );
} else {
$index = $pageMap[$row->rev_page];
- $fit = $result->addValue(
- [ 'query', $this->getModuleName(), $index, 'revisions' ],
- null, $rev );
+ $fit = $this->processRow( $row, $rev, $hookData ) &&
+ $result->addValue( [ 'query', $this->getModuleName(), $index, 'revisions' ], null, $rev );
}
if ( !$fit ) {
$this->setContinueEnumParameter( 'continue', "$row->rev_timestamp|$row->rev_id" );