r80690 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80689‎ | r80690 | r80691 >
Date:16:46, 21 January 2011
Author:happydog
Status:ok
Tags:
Comment:
CodeReview: Making the limit on the number of paths which we are able to diff on into a config variable, rather than having it hardcoded.
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.php (modified) (history)
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -510,8 +510,9 @@
511511 * @return bool
512512 */
513513 public function isDiffable() {
 514+ global $wgCodeReviewMaxDiffPaths;
514515 $paths = $this->getModifiedPaths();
515 - if ( !$paths->numRows() || $paths->numRows() > 20 ) {
 516+ if ( !$paths->numRows() || ( $wgCodeReviewMaxDiffPaths > 0 && $paths->numRows() > $wgCodeReviewMaxDiffPaths ) ) {
516517 return false; // things need to get done this year
517518 }
518519 return true;
Index: trunk/extensions/CodeReview/CodeReview.php
@@ -155,6 +155,14 @@
156156 $wgCodeReviewMaxDiffSize = 500000;
157157
158158 /**
 159+ * The maximum number of paths that we will perform a diff on.
 160+ * If a revision contains more changed paths than this, we will skip getting the
 161+ * diff altogether.
 162+ * May be set to 0 to indicate no limit.
 163+ */
 164+$wgCodeReviewMaxDiffPaths = 20;
 165+
 166+/**
159167 * Limit of the revisions accessible to the search by path.
160168 * Set to 0 to disable the limit.
161169 */

Status & tagging log