Index: trunk/extensions/CodeReview/ApiCodeUpdate.php |
— | — | @@ -30,14 +30,21 @@ |
31 | 31 | $log = $svn->getLog( '', $lastStoredRev + 1, $endRev ); |
32 | 32 | if( !$log ) { |
33 | 33 | throw new MWException( "Something awry..." ); |
34 | | - } |
| 34 | + } |
35 | 35 | |
| 36 | + $result = array(); |
36 | 37 | foreach( $log as $data ) { |
| 38 | + $r = array(); |
37 | 39 | $codeRev = CodeRevision::newFromSvn( $repo, $data ); |
38 | 40 | $codeRev->save(); |
39 | | - // would be nice to output something but the api code is weird |
40 | | - // and i don't feel like figuring it out right now :) |
| 41 | + $r['id'] = $codeRev->getId(); |
| 42 | + $r['author'] = $codeRev->getAuthor(); |
| 43 | + $r['timestamp'] = $codeRev->getTimestamp(); |
| 44 | + $r['message'] = $codeRev->getMessage(); |
| 45 | + $result[] = $r; |
41 | 46 | } |
| 47 | + $this->getResult()->setIndexedTagName($result, 'rev'); |
| 48 | + $this->getResult()->addValue(null, $this->getModuleName(), $result); |
42 | 49 | } |
43 | 50 | |
44 | 51 | public function mustBePosted() { |