r42241 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42240‎ | r42241 | r42242 >
Date:00:29, 20 October 2008
Author:aaron
Status:old
Tags:
Comment:
Rename mRepo to something less stupid
Modified paths:
  • /trunk/extensions/CodeReview/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeRevision.php
@@ -4,7 +4,7 @@
55 class CodeRevision {
66 static function newFromSvn( CodeRepository $repo, $data ) {
77 $rev = new CodeRevision();
8 - $rev->mRepo = $repo->getId();
 8+ $rev->mRepoId = $repo->getId();
99 $rev->mId = intval($data['rev']);
1010 $rev->mAuthor = $data['author'];
1111 $rev->mTimestamp = wfTimestamp( TS_MW, strtotime( $data['date'] ) );
@@ -45,7 +45,7 @@
4646
4747 static function newFromRow( $row ) {
4848 $rev = new CodeRevision();
49 - $rev->mRepo = intval($row->cr_repo_id);
 49+ $rev->mRepoId = intval($row->cr_repo_id);
5050 $rev->mId = intval($row->cr_id);
5151 $rev->mAuthor = $row->cr_author;
5252 $rev->mTimestamp = wfTimestamp( TS_MW, $row->cr_timestamp );
@@ -98,7 +98,7 @@
9999 $dbw->update( 'code_rev',
100100 array( 'cr_status' => $status ),
101101 array(
102 - 'cr_repo_id' => $this->mRepo,
 102+ 'cr_repo_id' => $this->mRepoId,
103103 'cr_id' => $this->mId ),
104104 __METHOD__ );
105105 }
@@ -109,7 +109,7 @@
110110
111111 $dbw->insert( 'code_rev',
112112 array(
113 - 'cr_repo_id' => $this->mRepo,
 113+ 'cr_repo_id' => $this->mRepoId,
114114 'cr_id' => $this->mId,
115115 'cr_author' => $this->mAuthor,
116116 'cr_timestamp' => $dbw->timestamp( $this->mTimestamp ),
@@ -127,7 +127,7 @@
128128 'cr_message' => $this->mMessage,
129129 'cr_path' => $this->mCommonPath ),
130130 array(
131 - 'cr_repo_id' => $this->mRepo,
 131+ 'cr_repo_id' => $this->mRepoId,
132132 'cr_id' => $this->mId ),
133133 __METHOD__ );
134134 }
@@ -136,7 +136,7 @@
137137 $data = array();
138138 foreach( $this->mPaths as $path ) {
139139 $data[] = array(
140 - 'cp_repo_id' => $this->mRepo,
 140+ 'cp_repo_id' => $this->mRepoId,
141141 'cp_rev_id' => $this->mId,
142142 'cp_path' => $path['path'],
143143 'cp_action' => $path['action'] );
@@ -155,7 +155,7 @@
156156 return $dbr->select(
157157 'code_paths',
158158 array( 'cp_path', 'cp_action' ),
159 - array( 'cp_repo_id' => $this->mRepo, 'cp_rev_id' => $this->mId ),
 159+ array( 'cp_repo_id' => $this->mRepoId, 'cp_rev_id' => $this->mId ),
160160 __METHOD__
161161 );
162162 }
@@ -194,7 +194,7 @@
195195 $ts = wfTimestamp( TS_MW );
196196 $sortkey = $this->threadedSortkey( $parent, $ts );
197197 return array(
198 - 'cc_repo_id' => $this->mRepo,
 198+ 'cc_repo_id' => $this->mRepoId,
199199 'cc_rev_id' => $this->mId,
200200 'cc_text' => $text,
201201 'cc_parent' => $parent,
@@ -238,7 +238,7 @@
239239 'cc_review',
240240 'cc_sortkey' ),
241241 array(
242 - 'cc_repo_id' => $this->mRepo,
 242+ 'cc_repo_id' => $this->mRepoId,
243243 'cc_rev_id' => $this->mId ),
244244 __METHOD__,
245245 array(
@@ -257,7 +257,7 @@
258258 $result = $dbr->select( 'code_tags',
259259 array( 'ct_tag' ),
260260 array(
261 - 'ct_repo_id' => $this->mRepo,
 261+ 'ct_repo_id' => $this->mRepoId,
262262 'ct_rev_id' => $this->mId ),
263263 __METHOD__ );
264264
@@ -284,7 +284,7 @@
285285 }
286286 $result = $dbw->delete( 'code_tags',
287287 array(
288 - 'ct_repo_id' => $this->mRepo,
 288+ 'ct_repo_id' => $this->mRepoId,
289289 'ct_rev_id' => $this->mId,
290290 'ct_tag' => $tagsNormal ),
291291 __METHOD__ );
@@ -294,7 +294,7 @@
295295 $data = array();
296296 foreach( $tags as $tag ) {
297297 $data[] = array(
298 - 'ct_repo_id' => $this->mRepo,
 298+ 'ct_repo_id' => $this->mRepoId,
299299 'ct_rev_id' => $this->mId,
300300 'ct_tag' => $this->normalizeTag( $tag ) );
301301 }
@@ -332,7 +332,7 @@
333333 $row = $dbr->selectRow( 'code_rev',
334334 'cr_id',
335335 array(
336 - 'cr_repo_id' => $this->mRepo,
 336+ 'cr_repo_id' => $this->mRepoId,
337337 "cr_id > $encId" ),
338338 __METHOD__,
339339 array(
@@ -352,7 +352,7 @@
353353 $row = $dbr->selectRow( 'code_rev',
354354 'cr_id',
355355 array(
356 - 'cr_repo_id' => $this->mRepo,
 356+ 'cr_repo_id' => $this->mRepoId,
357357 "cr_id > $encId",
358358 'cr_status' => array('new','fixme') ),
359359 __METHOD__,

Status & tagging log