r22800 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22799‎ | r22800 | r22801 >
Date:18:36, 6 June 2007
Author:brion
Status:old
Tags:
Comment:
Add a free() function on SearchResultSet class, so the underlying result set can be freed
Modified paths:
  • /trunk/phase3/includes/SearchEngine.php (modified) (history)
  • /trunk/phase3/includes/SearchMySQL.php (modified) (history)
  • /trunk/phase3/includes/SpecialSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SearchEngine.php
@@ -322,6 +322,14 @@
323323 function next() {
324324 return false;
325325 }
 326+
 327+ /**
 328+ * Frees the result set, if applicable.
 329+ * @ access public
 330+ */
 331+ function free() {
 332+ // ...
 333+ }
326334 }
327335
328336
Index: trunk/phase3/includes/SearchMySQL.php
@@ -200,6 +200,10 @@
201201 return new SearchResult( $row );
202202 }
203203 }
 204+
 205+ function free() {
 206+ $this->mResultSet->free();
 207+ }
204208 }
205209
206210 ?>
Index: trunk/phase3/includes/SpecialSearch.php
@@ -185,6 +185,7 @@
186186 } else {
187187 $wgOut->addWikiText( '==' . wfMsg( 'notitlematches' ) . "==\n" );
188188 }
 189+ $titleMatches->free();
189190 }
190191
191192 if( $textMatches ) {
@@ -195,6 +196,7 @@
196197 # Don't show the 'no text matches' if we received title matches
197198 $wgOut->addWikiText( '==' . wfMsg( 'notextmatches' ) . "==\n" );
198199 }
 200+ $textMatches->free();
199201 }
200202
201203 if ( $num == 0 ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r22811Merged revisions 22791-22810 via svnmerge from...david07:26, 7 June 2007

Status & tagging log