r69675 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69674‎ | r69675 | r69676 >
Date:11:51, 21 July 2010
Author:demon
Status:ok
Tags:
Comment:
Fix $wgCodeReviewDeferredPaths so it can be configured per-repo
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.php (modified) (history)
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.php
@@ -145,7 +145,9 @@
146146 $wgCodeReviewMaxDiffSize = 500000;
147147
148148 /**
149 - * Any base paths matching regular expressions in this array will have their
 149+ * Key is repository name. Value is an array of regexes
 150+ *
 151+ * Any base paths matching regular expressions in these arrays will have their
150152 * default status set to deferred instead of new. Helpful if you've got a part
151153 * of the repository you don't care about.
152154 */
Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -44,10 +44,12 @@
4545
4646 // Check for ignored paths
4747 global $wgCodeReviewDeferredPaths;
48 - foreach ( $wgCodeReviewDeferredPaths as $defer ) {
49 - if ( preg_match( $defer, $rev->mCommonPath ) ) {
50 - $rev->mStatus = 'deferred';
51 - break;
 48+ if( isset( $wgCodeReviewDeferredPaths[ $repo->getName() ] ) ) {
 49+ foreach( $wgCodeReviewDeferredPaths[ $repo->getName() ] as $defer ) {
 50+ if ( preg_match( $defer, $rev->mCommonPath ) ) {
 51+ $rev->mStatus = 'deferred';
 52+ break;
 53+ }
5254 }
5355 }
5456 return $rev;

Status & tagging log