Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -504,7 +504,6 @@ |
505 | 505 | foreach ( $result as $row ) { |
506 | 506 | $comments[] = CodeComment::newFromRow( $this, $row ); |
507 | 507 | } |
508 | | - $result->free(); |
509 | 508 | return $comments; |
510 | 509 | } |
511 | 510 | |
— | — | @@ -531,9 +530,25 @@ |
532 | 531 | foreach ( $result as $row ) { |
533 | 532 | $changes[] = CodePropChange::newFromRow( $this, $row ); |
534 | 533 | } |
535 | | - $result->free(); |
536 | 534 | return $changes; |
537 | 535 | } |
| 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 | + } |
538 | 553 | |
539 | 554 | protected function getCommentingUsers() { |
540 | 555 | $dbr = wfGetDB( DB_SLAVE ); |