From a1dfb8a83152ef7de97b212248b9837c0c21fbac Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 18 Jul 2007 09:29:41 +0000 Subject: [PATCH] Introduce IndexPager::preprocessResults(); useful for doing batch existence checks, etc. --- includes/Pager.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/Pager.php b/includes/Pager.php index 0dc29e3c4d..601c9a5294 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -107,6 +107,9 @@ abstract class IndexPager implements Pager { $this->mResult = $this->reallyDoQuery( $this->mOffset, $queryLimit, $descending ); $this->extractResultInfo( $this->mOffset, $queryLimit, $this->mResult ); $this->mQueryDone = true; + + $this->preprocessResults( $this->mResult ); + $this->mResult->rewind(); // Paranoia wfProfileOut( $fname ); } @@ -192,6 +195,13 @@ abstract class IndexPager implements Pager { return new ResultWrapper( $this->mDb, $res ); } + /** + * Pre-process results; useful for performing batch existence checks, etc. + * + * @param ResultWrapper $result Result wrapper + */ + protected function preprocessResult( $result ) {} + /** * Get the formatted result list. Calls getStartBody(), formatRow() and * getEndBody(), concatenates the results and returns them. -- 2.20.1