r42242 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42241‎ | r42242 | r42243 >
Date:00:31, 20 October 2008
Author:aaron
Status:old
Tags:
Comment:
Partial revert of r42239 - add newFromId() again
Modified paths:
  • /trunk/extensions/CodeReview/CodeRepository.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeRepository.php
@@ -23,7 +23,27 @@
2424 return null;
2525 }
2626 }
 27+
 28+ public static function newFromId( $id ) {
 29+ $dbw = wfGetDB( DB_MASTER );
 30+ $row = $dbw->selectRow(
 31+ 'code_repo',
 32+ array(
 33+ 'repo_id',
 34+ 'repo_name',
 35+ 'repo_path',
 36+ 'repo_viewvc',
 37+ 'repo_bugzilla' ),
 38+ array( 'repo_id' => intval($id) ),
 39+ __METHOD__ );
2740
 41+ if( $row ) {
 42+ return self::newFromRow( $row );
 43+ } else {
 44+ return null;
 45+ }
 46+ }
 47+
2848 static function newFromRow( $row ) {
2949 $repo = new CodeRepository();
3050 $repo->mId = intval($row->repo_id);

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r42239Back out r42193/r42194 for now "Add newFromId()" and "Send email notification...brion00:20, 20 October 2008

Status & tagging log