r81071 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81070‎ | r81071 | r81072 >
Date:23:37, 26 January 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
CodeRevision: Switch data members to protected, add missing get method. Rename all members to drop m prefix
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)
  • /trunk/extensions/CodeReview/svnImport.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionCommitter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -5,9 +5,9 @@
66 /**
77 * @var CodeRepository
88 */
9 - public $mRepo;
 9+ protected $repo;
1010
11 - public $mRepoId, $mId, $mAuthor, $mTimestamp, $mMessage, $mPaths, $mStatus, $mOldStatus, $mCommonPath;
 11+ protected $repoId, $id, $author, $timestamp, $message, $paths, $status, $oldStatus, $commonPath;
1212
1313 /**
1414 * @static
@@ -17,25 +17,25 @@
1818 */
1919 public static function newFromSvn( CodeRepository $repo, $data ) {
2020 $rev = new CodeRevision();
21 - $rev->mRepoId = $repo->getId();
22 - $rev->mRepo = $repo;
23 - $rev->mId = intval( $data['rev'] );
24 - $rev->mAuthor = $data['author'];
25 - $rev->mTimestamp = wfTimestamp( TS_MW, strtotime( $data['date'] ) );
26 - $rev->mMessage = rtrim( $data['msg'] );
27 - $rev->mPaths = $data['paths'];
28 - $rev->mStatus = 'new';
29 - $rev->mOldStatus = '';
 21+ $rev->repoId = $repo->getId();
 22+ $rev->repo = $repo;
 23+ $rev->id = intval( $data['rev'] );
 24+ $rev->author = $data['author'];
 25+ $rev->timestamp = wfTimestamp( TS_MW, strtotime( $data['date'] ) );
 26+ $rev->message = rtrim( $data['msg'] );
 27+ $rev->paths = $data['paths'];
 28+ $rev->status = 'new';
 29+ $rev->oldStatus = '';
3030
3131 $common = null;
32 - if ( $rev->mPaths ) {
33 - if ( count( $rev->mPaths ) == 1 ) {
34 - $common = $rev->mPaths[0]['path'];
 32+ if ( $rev->paths ) {
 33+ if ( count( $rev->paths ) == 1 ) {
 34+ $common = $rev->paths[0]['path'];
3535 } else {
36 - $first = array_shift( $rev->mPaths );
 36+ $first = array_shift( $rev->paths );
3737 $common = explode( '/', $first['path'] );
3838
39 - foreach ( $rev->mPaths as $path ) {
 39+ foreach ( $rev->paths as $path ) {
4040 $compare = explode( '/', $path['path'] );
4141
4242 // make sure $common is the shortest path
@@ -55,19 +55,19 @@
5656 }
5757 $common = implode( '/', $common );
5858
59 - array_unshift( $rev->mPaths, $first );
 59+ array_unshift( $rev->paths, $first );
6060 }
6161
62 - $rev->mPaths = CodeRevision::getPathFragments( $rev->mPaths );
 62+ $rev->paths = CodeRevision::getPathFragments( $rev->paths );
6363 }
64 - $rev->mCommonPath = $common;
 64+ $rev->commonPath = $common;
6565
6666 // Check for ignored paths
6767 global $wgCodeReviewDeferredPaths;
6868 if ( isset( $wgCodeReviewDeferredPaths[ $repo->getName() ] ) ) {
6969 foreach ( $wgCodeReviewDeferredPaths[ $repo->getName() ] as $defer ) {
70 - if ( preg_match( $defer, $rev->mCommonPath ) ) {
71 - $rev->mStatus = 'deferred';
 70+ if ( preg_match( $defer, $rev->commonPath ) ) {
 71+ $rev->status = 'deferred';
7272 break;
7373 }
7474 }
@@ -108,18 +108,18 @@
109109 */
110110 public static function newFromRow( CodeRepository $repo, $row ) {
111111 $rev = new CodeRevision();
112 - $rev->mRepoId = intval( $row->cr_repo_id );
113 - if ( $rev->mRepoId != $repo->getId() ) {
 112+ $rev->repoId = intval( $row->cr_repo_id );
 113+ if ( $rev->repoId != $repo->getId() ) {
114114 throw new MWException( "Invalid repo ID in " . __METHOD__ );
115115 }
116 - $rev->mRepo = $repo;
117 - $rev->mId = intval( $row->cr_id );
118 - $rev->mAuthor = $row->cr_author;
119 - $rev->mTimestamp = wfTimestamp( TS_MW, $row->cr_timestamp );
120 - $rev->mMessage = $row->cr_message;
121 - $rev->mStatus = $row->cr_status;
122 - $rev->mOldStatus = '';
123 - $rev->mCommonPath = $row->cr_path;
 116+ $rev->repo = $repo;
 117+ $rev->id = intval( $row->cr_id );
 118+ $rev->author = $row->cr_author;
 119+ $rev->timestamp = wfTimestamp( TS_MW, $row->cr_timestamp );
 120+ $rev->message = $row->cr_message;
 121+ $rev->status = $row->cr_status;
 122+ $rev->oldStatus = '';
 123+ $rev->commonPath = $row->cr_path;
124124 return $rev;
125125 }
126126
@@ -127,7 +127,7 @@
128128 * @return int
129129 */
130130 public function getId() {
131 - return intval( $this->mId );
 131+ return intval( $this->id );
132132 }
133133
134134 /**
@@ -140,7 +140,7 @@
141141 if ( $id === null ) {
142142 $id = $this->getId();
143143 }
144 - return $this->mRepo->getRevIdString( $id );
 144+ return $this->repo->getRevIdString( $id );
145145 }
146146
147147 /**
@@ -158,56 +158,63 @@
159159 if ( $id === null ) {
160160 $id = $this->getId();
161161 }
162 - return $this->mRepo->getRevIdStringUnique( $id );
 162+ return $this->repo->getRevIdStringUnique( $id );
163163 }
164164
165165 /**
166166 * @return int
167167 */
168168 public function getRepoId() {
169 - return intval( $this->mRepoId );
 169+ return intval( $this->repoId );
170170 }
171171
172172 /**
173 - * @return
 173+ * @return String
174174 */
175175 public function getAuthor() {
176 - return $this->mAuthor;
 176+ return $this->author;
177177 }
178178
179179 /**
180180 * @return
181181 */
182182 public function getWikiUser() {
183 - return $this->mRepo->authorWikiUser( $this->getAuthor() );
 183+ return $this->repo->authorWikiUser( $this->getAuthor() );
184184 }
185185
186186 /**
187187 * @return
188188 */
189189 public function getTimestamp() {
190 - return $this->mTimestamp;
 190+ return $this->timestamp;
191191 }
192192
193193 /**
194 - * @return
 194+ * @return String
195195 */
196196 public function getMessage() {
197 - return $this->mMessage;
 197+ return $this->message;
198198 }
199199
200200 /**
201 - * @return
 201+ * @return String
202202 */
203203 public function getStatus() {
204 - return $this->mStatus;
 204+ return $this->status;
205205 }
206206
207207 /**
208208 * @return String
209209 */
 210+ public function getOldStatus() {
 211+ return $this->oldStatus;
 212+ }
 213+
 214+ /**
 215+ * @return String
 216+ */
210217 public function getCommonPath() {
211 - return $this->mCommonPath;
 218+ return $this->commonPath;
212219 }
213220
214221 /**
@@ -247,21 +254,21 @@
248255 }
249256 // Get the old status from the master
250257 $dbw = wfGetDB( DB_MASTER );
251 - $this->mOldStatus = $dbw->selectField( 'code_rev',
 258+ $this->oldStatus = $dbw->selectField( 'code_rev',
252259 'cr_status',
253 - array( 'cr_repo_id' => $this->mRepoId, 'cr_id' => $this->mId ),
 260+ array( 'cr_repo_id' => $this->repoId, 'cr_id' => $this->id ),
254261 __METHOD__
255262 );
256 - if ( $this->mOldStatus === $status ) {
 263+ if ( $this->oldStatus === $status ) {
257264 return false; // nothing to do here
258265 }
259266 // Update status
260 - $this->mStatus = $status;
 267+ $this->status = $status;
261268 $dbw->update( 'code_rev',
262269 array( 'cr_status' => $status ),
263270 array(
264 - 'cr_repo_id' => $this->mRepoId,
265 - 'cr_id' => $this->mId ),
 271+ 'cr_repo_id' => $this->repoId,
 272+ 'cr_id' => $this->id ),
266273 __METHOD__
267274 );
268275 // Log this change
@@ -271,7 +278,7 @@
272279 'cpc_repo_id' => $this->getRepoId(),
273280 'cpc_rev_id' => $this->getId(),
274281 'cpc_attrib' => 'status',
275 - 'cpc_removed' => $this->mOldStatus,
 282+ 'cpc_removed' => $this->oldStatus,
276283 'cpc_added' => $status,
277284 'cpc_timestamp' => $dbw->timestamp(),
278285 'cpc_user' => $user->getId(),
@@ -281,7 +288,7 @@
282289 );
283290 }
284291
285 - $this->sendStatusToUDP( $status, $this->mOldStatus );
 292+ $this->sendStatusToUDP( $status, $this->oldStatus );
286293
287294 return true;
288295 }
@@ -316,13 +323,13 @@
317324
318325 $dbw->insert( 'code_rev',
319326 array(
320 - 'cr_repo_id' => $this->mRepoId,
321 - 'cr_id' => $this->mId,
322 - 'cr_author' => $this->mAuthor,
323 - 'cr_timestamp' => $dbw->timestamp( $this->mTimestamp ),
324 - 'cr_message' => $this->mMessage,
325 - 'cr_status' => $this->mStatus,
326 - 'cr_path' => $this->mCommonPath,
 327+ 'cr_repo_id' => $this->repoId,
 328+ 'cr_id' => $this->id,
 329+ 'cr_author' => $this->author,
 330+ 'cr_timestamp' => $dbw->timestamp( $this->timestamp ),
 331+ 'cr_message' => $this->message,
 332+ 'cr_status' => $this->status,
 333+ 'cr_path' => $this->commonPath,
327334 'cr_flags' => '' ),
328335 __METHOD__,
329336 array( 'IGNORE' )
@@ -333,20 +340,20 @@
334341 if ( !$newRevision ) {
335342 $dbw->update( 'code_rev',
336343 array(
337 - 'cr_author' => $this->mAuthor,
338 - 'cr_timestamp' => $dbw->timestamp( $this->mTimestamp ),
339 - 'cr_message' => $this->mMessage,
340 - 'cr_path' => $this->mCommonPath ),
 344+ 'cr_author' => $this->author,
 345+ 'cr_timestamp' => $dbw->timestamp( $this->timestamp ),
 346+ 'cr_message' => $this->message,
 347+ 'cr_path' => $this->commonPath ),
341348 array(
342 - 'cr_repo_id' => $this->mRepoId,
343 - 'cr_id' => $this->mId ),
 349+ 'cr_repo_id' => $this->repoId,
 350+ 'cr_id' => $this->id ),
344351 __METHOD__
345352 );
346353 }
347354
348355 // Update path tracking used for output and searching
349 - if ( $this->mPaths ) {
350 - CodeRevision::insertPaths( $dbw, $this->mPaths, $this->mRepoId, $this->mId );
 356+ if ( $this->paths ) {
 357+ CodeRevision::insertPaths( $dbw, $this->paths, $this->repoId, $this->id );
351358 }
352359
353360 $affectedRevs = $this->getUniqueAffectedRevs();
@@ -361,7 +368,7 @@
362369 // Get committer wiki user name, or repo name at least
363370 $commitAuthor = $this->getWikiUser();
364371 # Author might not have a username in the wiki:
365 - $committer = $commitAuthor ? $commitAuthor->getName() : htmlspecialchars( $this->mAuthor );
 372+ $committer = $commitAuthor ? $commitAuthor->getName() : htmlspecialchars( $this->author );
366373 // Get the authors of these revisions
367374 $res = $dbw->select( 'code_rev',
368375 array(
@@ -374,11 +381,11 @@
375382 'cr_path',
376383 ),
377384 array(
378 - 'cr_repo_id' => $this->mRepoId,
 385+ 'cr_repo_id' => $this->repoId,
379386 'cr_id' => $affectedRevs,
380 - 'cr_id < ' . intval( $this->mId ), # just in case
 387+ 'cr_id < ' . intval( $this->id ), # just in case
381388 // No sense in notifying if it's the same person
382 - 'cr_author != ' . $dbw->addQuotes( $this->mAuthor )
 389+ 'cr_author != ' . $dbw->addQuotes( $this->author )
383390 ),
384391 __METHOD__,
385392 array( 'USE INDEX' => 'PRIMARY' )
@@ -388,7 +395,7 @@
389396 $url = $this->getFullUrl();
390397
391398 foreach ( $res as $row ) {
392 - $revision = CodeRevision::newFromRow( $this->mRepo, $row );
 399+ $revision = CodeRevision::newFromRow( $this->repo, $row );
393400 $users = $revision->getCommentingUsers();
394401
395402 $rowUrl = $revision->getFullUrl();
@@ -406,10 +413,10 @@
407414 // Send message in receiver's language
408415 $lang = array( 'language' => $user->getOption( 'language' ) );
409416 $user->sendMail(
410 - wfMsgExt( 'codereview-email-subj2', $lang, $this->mRepo->getName(),
 417+ wfMsgExt( 'codereview-email-subj2', $lang, $this->repo->getName(),
411418 $this->getIdString( $row->cr_id ) ),
412419 wfMsgExt( 'codereview-email-body2', $lang, $committer,
413 - $this->getIdStringUnique( $row->cr_id ), $url, $this->mMessage, $rowUrl )
 420+ $this->getIdStringUnique( $row->cr_id ), $url, $this->message, $rowUrl )
414421 );
415422 }
416423 }
@@ -447,10 +454,10 @@
448455 public function getAffectedRevs() {
449456 $affectedRevs = array();
450457 $m = array();
451 - if ( preg_match_all( '/\br(\d{2,})\b/', $this->mMessage, $m ) ) {
 458+ if ( preg_match_all( '/\br(\d{2,})\b/', $this->message, $m ) ) {
452459 foreach ( $m[1] as $rev ) {
453460 $affectedRev = intval( $rev );
454 - if ( $affectedRev != $this->mId ) {
 461+ if ( $affectedRev != $this->id ) {
455462 $affectedRevs[] = $affectedRev;
456463 }
457464 }
@@ -469,12 +476,12 @@
470477 // Update bug references table...
471478 $affectedBugs = array();
472479 $m = array();
473 - if ( preg_match_all( '/\bbug (\d+)\b/', $this->mMessage, $m ) ) {
 480+ if ( preg_match_all( '/\bbug (\d+)\b/', $this->message, $m ) ) {
474481 $data = array();
475482 foreach ( $m[1] as $bug ) {
476483 $data[] = array(
477 - 'cb_repo_id' => $this->mRepoId,
478 - 'cb_from' => $this->mId,
 484+ 'cb_repo_id' => $this->repoId,
 485+ 'cb_from' => $this->id,
479486 'cb_bug' => $bug
480487 );
481488 $affectedBugs[] = intval( $bug );
@@ -488,9 +495,9 @@
489496 $res = $dbw->select( 'code_bugs',
490497 array( 'cb_from' ),
491498 array(
492 - 'cb_repo_id' => $this->mRepoId,
 499+ 'cb_repo_id' => $this->repoId,
493500 'cb_bug' => $affectedBugs,
494 - 'cb_from < ' . intval( $this->mId ), # just in case
 501+ 'cb_from < ' . intval( $this->id ), # just in case
495502 ),
496503 __METHOD__,
497504 array( 'USE INDEX' => 'cb_repo_id' )
@@ -511,7 +518,7 @@
512519 return $dbr->select(
513520 'code_paths',
514521 array( 'cp_path', 'cp_action' ),
515 - array( 'cp_repo_id' => $this->mRepoId, 'cp_rev_id' => $this->mId ),
 522+ array( 'cp_repo_id' => $this->repoId, 'cp_rev_id' => $this->id ),
516523 __METHOD__
517524 );
518525 }
@@ -605,7 +612,7 @@
606613 // Send message in receiver's language
607614 $lang = array( 'language' => $user->getOption( 'language' ) );
608615
609 - $localSubject = wfMsgExt( $subject, $lang, $this->mRepo->getName(), $this->getIdString() );
 616+ $localSubject = wfMsgExt( $subject, $lang, $this->repo->getName(), $this->getIdString() );
610617 $localBody = call_user_func_array( 'wfMsgExt', array_merge( array( $body, $lang, $wgUser->getName() ), $args ) );
611618
612619 $user->sendMail( $localSubject, $localBody );
@@ -625,8 +632,8 @@
626633 $ts = wfTimestamp( TS_MW );
627634 $sortkey = $this->threadedSortkey( $parent, $ts );
628635 return array(
629 - 'cc_repo_id' => $this->mRepoId,
630 - 'cc_rev_id' => $this->mId,
 636+ 'cc_repo_id' => $this->repoId,
 637+ 'cc_rev_id' => $this->id,
631638 'cc_text' => $text,
632639 'cc_parent' => $parent,
633640 'cc_user' => $wgUser->getId(),
@@ -677,8 +684,8 @@
678685 'cc_review',
679686 'cc_sortkey' ),
680687 array(
681 - 'cc_repo_id' => $this->mRepoId,
682 - 'cc_rev_id' => $this->mId ),
 688+ 'cc_repo_id' => $this->repoId,
 689+ 'cc_rev_id' => $this->id ),
683690 __METHOD__,
684691 array(
685692 'ORDER BY' => 'cc_sortkey' )
@@ -698,8 +705,8 @@
699706 $result = $dbr->select( 'code_comment',
700707 array( 'cc_id' ),
701708 array(
702 - 'cc_repo_id' => $this->mRepoId,
703 - 'cc_rev_id' => $this->mId ),
 709+ 'cc_repo_id' => $this->repoId,
 710+ 'cc_rev_id' => $this->id ),
704711 __METHOD__
705712 );
706713
@@ -725,8 +732,8 @@
726733 'cpc_user_text',
727734 'user_name'
728735 ), array(
729 - 'cpc_repo_id' => $this->mRepoId,
730 - 'cpc_rev_id' => $this->mId,
 736+ 'cpc_repo_id' => $this->repoId,
 737+ 'cpc_rev_id' => $this->id,
731738 ),
732739 __METHOD__,
733740 array( 'ORDER BY' => 'cpc_timestamp DESC' ),
@@ -747,8 +754,8 @@
748755 $result = $dbr->select( 'code_prop_changes',
749756 'DISTINCT(cpc_user)',
750757 array(
751 - 'cpc_repo_id' => $this->mRepoId,
752 - 'cpc_rev_id' => $this->mId,
 758+ 'cpc_repo_id' => $this->repoId,
 759+ 'cpc_rev_id' => $this->id,
753760 ),
754761 __METHOD__
755762 );
@@ -774,8 +781,8 @@
775782 $res = $dbr->select( 'code_comment',
776783 'DISTINCT(cc_user)',
777784 array(
778 - 'cc_repo_id' => $this->mRepoId,
779 - 'cc_rev_id' => $this->mId,
 785+ 'cc_repo_id' => $this->repoId,
 786+ 'cc_rev_id' => $this->id,
780787 'cc_user != 0' // users only
781788 ),
782789 __METHOD__
@@ -801,15 +808,15 @@
802809 array( 'code_relations', 'code_rev' ),
803810 array( 'cr_id', 'cr_status', 'cr_timestamp', 'cr_author', 'cr_message' ),
804811 array(
805 - 'cf_repo_id' => $this->mRepoId,
806 - 'cf_to' => $this->mId,
 812+ 'cf_repo_id' => $this->repoId,
 813+ 'cf_to' => $this->id,
807814 'cr_repo_id = cf_repo_id',
808815 'cr_id = cf_from'
809816 ),
810817 __METHOD__
811818 );
812819 foreach( $res as $row ) {
813 - if ( $this->mId < intval( $row->cr_id ) ) {
 820+ if ( $this->id < intval( $row->cr_id ) ) {
814821 $refs[] = $row;
815822 }
816823 }
@@ -891,8 +898,8 @@
892899 $result = $db->select( 'code_signoffs',
893900 array( 'cs_user', 'cs_user_text', 'cs_flag', 'cs_timestamp', 'cs_timestamp_struck' ),
894901 array(
895 - 'cs_repo_id' => $this->mRepoId,
896 - 'cs_rev_id' => $this->mId,
 902+ 'cs_repo_id' => $this->repoId,
 903+ 'cs_rev_id' => $this->id,
897904 ),
898905 __METHOD__,
899906 array( 'ORDER BY' => 'cs_timestamp' )
@@ -915,8 +922,8 @@
916923 $rows = array();
917924 foreach ( (array)$flags as $flag ) {
918925 $rows[] = array(
919 - 'cs_repo_id' => $this->mRepoId,
920 - 'cs_rev_id' => $this->mId,
 926+ 'cs_repo_id' => $this->repoId,
 927+ 'cs_rev_id' => $this->id,
921928 'cs_user' => $user->getID(),
922929 'cs_user_text' => $user->getName(),
923930 'cs_flag' => $flag,
@@ -953,8 +960,8 @@
954961 $result = $db->select( 'code_tags',
955962 array( 'ct_tag' ),
956963 array(
957 - 'ct_repo_id' => $this->mRepoId,
958 - 'ct_rev_id' => $this->mId ),
 964+ 'ct_repo_id' => $this->repoId,
 965+ 'ct_rev_id' => $this->id ),
959966 __METHOD__ );
960967
961968 $tags = array();
@@ -990,8 +997,8 @@
991998 if ( $removeTags ) {
992999 $dbw->delete( 'code_tags',
9931000 array(
994 - 'ct_repo_id' => $this->mRepoId,
995 - 'ct_rev_id' => $this->mId,
 1001+ 'ct_repo_id' => $this->repoId,
 1002+ 'ct_rev_id' => $this->id,
9961003 'ct_tag' => $removeTags ),
9971004 __METHOD__
9981005 );
@@ -1035,8 +1042,8 @@
10361043 foreach ( $tags as $tag ) {
10371044 if ( $tag == '' ) continue;
10381045 $data[] = array(
1039 - 'ct_repo_id' => $this->mRepoId,
1040 - 'ct_rev_id' => $this->mId,
 1046+ 'ct_repo_id' => $this->repoId,
 1047+ 'ct_rev_id' => $this->id,
10411048 'ct_tag' => $this->normalizeTag( $tag ) );
10421049 }
10431050 return $data;
@@ -1072,14 +1079,14 @@
10731080 */
10741081 public function getPrevious( $path = '' ) {
10751082 $dbr = wfGetDB( DB_SLAVE );
1076 - $encId = $dbr->addQuotes( $this->mId );
 1083+ $encId = $dbr->addQuotes( $this->id );
10771084 $tables = array( 'code_rev' );
10781085 if ( $path != '' ) {
10791086 $conds = $this->getPathConds( $path );
10801087 $order = 'cp_rev_id DESC';
10811088 $tables[] = 'code_paths';
10821089 } else {
1083 - $conds = array( 'cr_repo_id' => $this->mRepoId );
 1090+ $conds = array( 'cr_repo_id' => $this->repoId );
10841091 $order = 'cr_id DESC';
10851092 }
10861093 $conds[] = "cr_id < $encId";
@@ -1101,14 +1108,14 @@
11021109 */
11031110 public function getNext( $path = '' ) {
11041111 $dbr = wfGetDB( DB_SLAVE );
1105 - $encId = $dbr->addQuotes( $this->mId );
 1112+ $encId = $dbr->addQuotes( $this->id );
11061113 $tables = array( 'code_rev' );
11071114 if ( $path != '' ) {
11081115 $conds = $this->getPathConds( $path );
11091116 $order = 'cp_rev_id ASC';
11101117 $tables[] = 'code_paths';
11111118 } else {
1112 - $conds = array( 'cr_repo_id' => $this->mRepoId );
 1119+ $conds = array( 'cr_repo_id' => $this->repoId );
11131120 $order = 'cr_id ASC';
11141121 }
11151122 $conds[] = "cr_id > $encId";
@@ -1130,7 +1137,7 @@
11311138 */
11321139 protected function getPathConds( $path ) {
11331140 return array(
1134 - 'cp_repo_id' => $this->mRepoId,
 1141+ 'cp_repo_id' => $this->repoId,
11351142 'cp_path' => $path,
11361143 // join conds
11371144 'cr_repo_id = cp_repo_id',
@@ -1144,14 +1151,14 @@
11451152 */
11461153 public function getNextUnresolved( $path = '' ) {
11471154 $dbr = wfGetDB( DB_SLAVE );
1148 - $encId = $dbr->addQuotes( $this->mId );
 1155+ $encId = $dbr->addQuotes( $this->id );
11491156 $tables = array( 'code_rev' );
11501157 if ( $path != '' ) {
11511158 $conds = $this->getPathConds( $path );
11521159 $order = 'cp_rev_id ASC';
11531160 $tables[] = 'code_paths';
11541161 } else {
1155 - $conds = array( 'cr_repo_id' => $this->mRepoId );
 1162+ $conds = array( 'cr_repo_id' => $this->repoId );
11561163 $order = 'cr_id ASC';
11571164 }
11581165 $conds[] = "cr_id > $encId";
@@ -1173,7 +1180,7 @@
11741181 * @return \type
11751182 */
11761183 public function getFullUrl( $commentId = '' ) {
1177 - $title = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $this->mId );
 1184+ $title = SpecialPage::getTitleFor( 'Code', $this->repo->getName() . '/' . $this->id );
11781185
11791186 if ( $commentId !== '' ) {
11801187 $title->setFragment( "#c{$commentId}" );
@@ -1196,7 +1203,7 @@
11971204 $url = $this->getFullUrl( $commentId );
11981205 }
11991206
1200 - $line = wfMsg( 'code-rev-message' ) . " \00314(" . $this->mRepo->getName() .
 1207+ $line = wfMsg( 'code-rev-message' ) . " \00314(" . $this->repo->getName() .
12011208 ")\003 \0037" . $this->getIdString() . "\003 \00303" . RecentChange::cleanupForIRC( $wgUser->getName() ) .
12021209 "\003: \00310" . RecentChange::cleanupForIRC( $wgLang->truncate( $text, 100 ) ) . "\003 " . $url;
12031210
@@ -1215,7 +1222,7 @@
12161223 if( $wgCodeReviewUDPAddress ) {
12171224 $url = $this->getFullUrl();
12181225
1219 - $line = wfMsg( 'code-rev-status' ) . " \00314(" . $this->mRepo->getName() .
 1226+ $line = wfMsg( 'code-rev-status' ) . " \00314(" . $this->repo->getName() .
12201227 ")\00303 " . RecentChange::cleanupForIRC( $wgUser->getName() ) . "\003 " .
12211228 /* Remove three apostrophes as they are intended for the parser */
12221229 str_replace( "'''", '', wfMsg( 'code-change-status', "\0037" . $this->getIdString() . "\003" ) ) .
Index: trunk/extensions/CodeReview/svnImport.php
@@ -114,8 +114,8 @@
115115
116116 $this->output( sprintf( "%d %s %s (%0.1f revs/sec)\n",
117117 $codeRev->getId(),
118 - wfTimestamp( TS_DB, $codeRev->mTimestamp ),
119 - $codeRev->mAuthor,
 118+ wfTimestamp( TS_DB, $codeRev->getTimestamp() ),
 119+ $codeRev->getAuthor(),
120120 $revSpeed ) );
121121 }
122122 wfWaitForSlaves( 5 );
Index: trunk/extensions/CodeReview/ui/CodeRevisionCommitter.php
@@ -120,12 +120,12 @@
121121 if ( $statusChanged && $commentAdded ) {
122122 $url = $this->mRev->getFullUrl( $commentId );
123123 $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj4', 'codereview-email-body4',
124 - $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->mOldStatus, $this->mRev->mStatus,
 124+ $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(), $this->mRev->getStatus(),
125125 $url, $this->text
126126 );
127127 } else if ( $statusChanged ) {
128128 $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj3', 'codereview-email-body3',
129 - $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->mOldStatus, $this->mRev->mStatus
 129+ $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(), $this->mRev->getStatus()
130130 );
131131 } else if ( $commentAdded ) {
132132 $url = $this->mRev->getFullUrl( $commentId );

Follow-up revisions

RevisionCommit summaryAuthorDate
r83676Fix for r81071, still one $mAuthor left....demon23:01, 10 March 2011

Comments

#Comment by Hashar (talk | contribs)   20:44, 10 March 2011

you could have made those three revisions. Easier to review.

Status & tagging log