r45086 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45085‎ | r45086 | r45087 >
Date:12:35, 27 December 2008
Author:aaron
Status:ok
Tags:
Comment:
Add some diff caching
Modified paths:
  • /trunk/extensions/CodeReview/ApiCodeUpdate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ApiCodeUpdate.php
@@ -46,6 +46,14 @@
4747 'message' => $codeRev->getMessage()
4848 );
4949 }
 50+ // Cache the diffs if there are a only a few.
 51+ // Mainly for WMF post-commit ping hook...
 52+ if( count($result) <= 2 ) {
 53+ foreach( $result as $revData ) {
 54+ $rev = $repo->getRevision( $revData['id'] );
 55+ $diff = $repo->getDiff( $revData['id'] ); // trigger caching
 56+ }
 57+ }
5058 $this->getResult()->setIndexedTagName($result, 'rev');
5159 $this->getResult()->addValue(null, $this->getModuleName(), $result);
5260 }

Status & tagging log