Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -510,8 +510,9 @@ |
511 | 511 | * @return bool |
512 | 512 | */ |
513 | 513 | public function isDiffable() { |
| 514 | + global $wgCodeReviewMaxDiffPaths; |
514 | 515 | $paths = $this->getModifiedPaths(); |
515 | | - if ( !$paths->numRows() || $paths->numRows() > 20 ) { |
| 516 | + if ( !$paths->numRows() || ( $wgCodeReviewMaxDiffPaths > 0 && $paths->numRows() > $wgCodeReviewMaxDiffPaths ) ) { |
516 | 517 | return false; // things need to get done this year |
517 | 518 | } |
518 | 519 | return true; |
Index: trunk/extensions/CodeReview/CodeReview.php |
— | — | @@ -155,6 +155,14 @@ |
156 | 156 | $wgCodeReviewMaxDiffSize = 500000; |
157 | 157 | |
158 | 158 | /** |
| 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 | +/** |
159 | 167 | * Limit of the revisions accessible to the search by path. |
160 | 168 | * Set to 0 to disable the limit. |
161 | 169 | */ |