Index: trunk/extensions/CodeReview/CodeRevision.php |
— | — | @@ -133,7 +133,8 @@ |
134 | 134 | 'cpc_removed' => $oldStatus, |
135 | 135 | 'cpc_added' => $status, |
136 | 136 | 'cpc_timestamp' => $dbw->timestamp(), |
137 | | - 'cpc_user' => $user->getId() |
| 137 | + 'cpc_user' => $user->getId(), |
| 138 | + 'cpc_user_text' => $user->getName() |
138 | 139 | ), |
139 | 140 | __METHOD__ |
140 | 141 | ); |
— | — | @@ -311,8 +312,8 @@ |
312 | 313 | 'cc_rev_id' => $this->mId ), |
313 | 314 | __METHOD__, |
314 | 315 | array( |
315 | | - 'ORDER BY' => 'cc_sortkey' ) ); |
316 | | - |
| 316 | + 'ORDER BY' => 'cc_sortkey' ) |
| 317 | + ); |
317 | 318 | $comments = array(); |
318 | 319 | foreach( $result as $row ) { |
319 | 320 | $comments[] = CodeComment::newFromRow( $this, $row ); |
— | — | @@ -321,6 +322,31 @@ |
322 | 323 | return $comments; |
323 | 324 | } |
324 | 325 | |
| 326 | + public function getPropChanges() { |
| 327 | + $dbr = wfGetDB( DB_SLAVE ); |
| 328 | + $result = $dbr->select( 'code_prop_changes', |
| 329 | + array( |
| 330 | + 'cpc_attrib', |
| 331 | + 'cpc_removed', |
| 332 | + 'cpc_added', |
| 333 | + 'cpc_timestamp', |
| 334 | + 'cpc_user', |
| 335 | + 'cpc_user_text' |
| 336 | + ), array( |
| 337 | + 'cpc_repo_id' => $this->mRepoId, |
| 338 | + 'cpc_rev_id' => $this->mId ), |
| 339 | + __METHOD__, |
| 340 | + array( |
| 341 | + 'ORDER BY' => 'cpc_timestamp DESC' ) |
| 342 | + ); |
| 343 | + $changes = array(); |
| 344 | + foreach( $result as $row ) { |
| 345 | + $changes[] = CodePropChange::newFromRow( $this, $row ); |
| 346 | + } |
| 347 | + $result->free(); |
| 348 | + return $changes; |
| 349 | + } |
| 350 | + |
325 | 351 | protected function getCommentingUsers() { |
326 | 352 | $dbr = wfGetDB( DB_SLAVE ); |
327 | 353 | $res = $dbr->select( 'code_comment', |
— | — | @@ -391,7 +417,8 @@ |
392 | 418 | 'cpc_removed' => implode(',',$removeTags), |
393 | 419 | 'cpc_added' => implode(',',$addTags), |
394 | 420 | 'cpc_timestamp' => $dbw->timestamp(), |
395 | | - 'cpc_user' => $user->getId() |
| 421 | + 'cpc_user' => $user->getId(), |
| 422 | + 'cpc_user_text' => $user->getName() |
396 | 423 | ), |
397 | 424 | __METHOD__ |
398 | 425 | ); |