r70591 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70590‎ | r70591 | r70592 >
Date:20:19, 6 August 2010
Author:reedy
Status:ok
Tags:
Comment:
kill some $result->free()

Add getPropChangeUsers() incase liangent does want to email taggers/status changers also...
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -504,7 +504,6 @@
505505 foreach ( $result as $row ) {
506506 $comments[] = CodeComment::newFromRow( $this, $row );
507507 }
508 - $result->free();
509508 return $comments;
510509 }
511510
@@ -531,9 +530,25 @@
532531 foreach ( $result as $row ) {
533532 $changes[] = CodePropChange::newFromRow( $this, $row );
534533 }
535 - $result->free();
536534 return $changes;
537535 }
 536+
 537+ public function getPropChangeUsers() {
 538+ $dbr = wfGetDB( DB_SLAVE );
 539+ $result = $dbr->select( 'code_prop_changes',
 540+ 'DISTINCT(cpc_user)',
 541+ array(
 542+ 'cpc_repo_id' => $this->mRepoId,
 543+ 'cpc_rev_id' => $this->mId,
 544+ ),
 545+ __METHOD__
 546+ );
 547+ $users = array();
 548+ foreach ( $result as $row ) {
 549+ $users[$row->cpc_user] = User::newFromId( $row->cpc_user );
 550+ }
 551+ return $users;
 552+ }
538553
539554 protected function getCommentingUsers() {
540555 $dbr = wfGetDB( DB_SLAVE );

Status & tagging log