return $s;
}
+ function doBatchLookups() {
+ # Do a link batch query
+ $this->mResult->seek( 0 );
+ $batch = new LinkBatch();
+ # Give some pointers to make (last) links
+ foreach ( $this->mResult as $row ) {
+ $batch->addObj( Title::makeTitleSafe( NS_USER, $row->rev_user_name ) );
+ $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->rev_user_name ) );
+ }
+ $batch->execute();
+ $this->mResult->seek( 0 );
+ }
+
/**
* Creates begin of history list with a submit button
*
*
* @return String
*/
- function getBody() {
+ public function getBody() {
if ( !$this->mQueryDone ) {
$this->doQuery();
}
+ # Do any special query batches before display
+ $this->doBatchLookups();
+
# Don't use any extra rows returned by the query
$numRows = min( $this->mResult->numRows(), $this->mLimit );
);
}
+ /**
+ * Called from getBody(), before getStartBody() is called. This
+ * will be called even if there are no rows in the result set.
+ *
+ * @return void
+ */
+ protected function doBatchLookups() {}
+
/**
* Hook into getBody(), allows text to be inserted at the start. This
* will be called even if there are no rows in the result set.
*
* @return String
*/
- function getStartBody() {
+ protected function getStartBody() {
return '';
}
*
* @return String
*/
- function getEndBody() {
+ protected function getEndBody() {
return '';
}
*
* @return String
*/
- function getEmptyBody() {
+ protected function getEmptyBody() {
return '';
}