Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -2,6 +2,8 @@ |
3 | 3 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
4 | 4 | |
5 | 5 | class CodeRevision { |
| 6 | + public $mRepoId, $mRepo, $mId, $mAuthor, $mTimestamp, $mMessage, $mPaths, $mStatus, $mOldStatus, $mCommonPath; |
| 7 | + |
6 | 8 | public static function newFromSvn( CodeRepository $repo, $data ) { |
7 | 9 | $rev = new CodeRevision(); |
8 | 10 | $rev->mRepoId = $repo->getId(); |
— | — | @@ -27,8 +29,9 @@ |
28 | 30 | $compare = explode( '/', $path['path'] ); |
29 | 31 | |
30 | 32 | // make sure $common is the shortest path |
31 | | - if ( count( $compare ) < count( $common ) ) |
| 33 | + if ( count( $compare ) < count( $common ) ) { |
32 | 34 | list( $compare, $common ) = array( $common, $compare ); |
| 35 | + } |
33 | 36 | |
34 | 37 | $tmp = array(); |
35 | 38 | foreach ( $common as $k => $v ) { |
— | — | @@ -366,8 +369,10 @@ |
367 | 370 | // Send message in receiver's language |
368 | 371 | $lang = array( 'language' => $user->getOption( 'language' ) ); |
369 | 372 | $user->sendMail( |
370 | | - wfMsgExt( 'codereview-email-subj2', $lang, $this->mRepo->getName(), $this->getIdString( $row->cr_id ) ), |
371 | | - wfMsgExt( 'codereview-email-body2', $lang, $committer, $this->getIdStringUnique( $row->cr_id ), $url, $this->mMessage, $rowUrl ) |
| 373 | + wfMsgExt( 'codereview-email-subj2', $lang, $this->mRepo->getName(), |
| 374 | + $this->getIdString( $row->cr_id ) ), |
| 375 | + wfMsgExt( 'codereview-email-body2', $lang, $committer, |
| 376 | + $this->getIdStringUnique( $row->cr_id ), $url, $this->mMessage, $rowUrl ) |
372 | 377 | ); |
373 | 378 | } |
374 | 379 | } |
— | — | @@ -595,7 +600,7 @@ |
596 | 601 | __METHOD__ |
597 | 602 | ); |
598 | 603 | $users = array(); |
599 | | - while ( $row = $res->fetchObject() ) { |
| 604 | + foreach( $res as $row ) { |
600 | 605 | $users[$row->cc_user] = User::newFromId( $row->cc_user ); |
601 | 606 | } |
602 | 607 | return $users; |
— | — | @@ -615,7 +620,7 @@ |
616 | 621 | ), |
617 | 622 | __METHOD__ |
618 | 623 | ); |
619 | | - while ( $row = $res->fetchObject() ) { |
| 624 | + foreach( $res as $row ) { |
620 | 625 | if ( $this->mId != intval( $row->cr_id ) ) { |
621 | 626 | $refs[] = $row; |
622 | 627 | } |