Index: trunk/extensions/ApprovedRevs/ApprovedRevs.php |
— | — | @@ -26,6 +26,7 @@ |
27 | 27 | $egApprovedRevsScriptPath = $wgScriptPath . '/extensions/ApprovedRevs'; |
28 | 28 | $egApprovedRevsNamespaces = array( NS_MAIN, NS_TEMPLATE, NS_HELP, NS_PROJECT ); |
29 | 29 | $egApprovedRevsBlankIfUnapproved = false; |
| 30 | +$egApprovedRevsAutomaticApprovals = true; |
30 | 31 | |
31 | 32 | // internationalization |
32 | 33 | $wgExtensionMessagesFiles['ApprovedRevs'] = $egApprovedRevsIP . 'ApprovedRevs.i18n.php'; |
Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php |
— | — | @@ -47,12 +47,12 @@ |
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | | - * If the user saving this page has approval power, and the page |
52 | | - * is approvable, and either (a) this page already has an approved |
53 | | - * revision, or (b) unapproved pages are shown as blank on this |
54 | | - * wiki, automatically set this latest revision to be the approved |
55 | | - * one - don't bother logging the approval, though; the log is |
56 | | - * reserved for manual approvals. |
| 51 | + * If the user saving this page has approval power, and automatic |
| 52 | + * approvals are enabled, and the page is approvable, and either |
| 53 | + * (a) this page already has an approved revision, or (b) unapproved |
| 54 | + * pages are shown as blank on this wiki, automatically set this |
| 55 | + * latest revision to be the approved one - don't bother logging |
| 56 | + * the approval, though; the log is reserved for manual approvals. |
57 | 57 | */ |
58 | 58 | static public function setLatestAsApproved( &$article ) { |
59 | 59 | $title = $article->getTitle(); |
— | — | @@ -60,6 +60,11 @@ |
61 | 61 | return true; |
62 | 62 | } |
63 | 63 | |
| 64 | + global $egApprovedRevsAutomaticApprovals; |
| 65 | + if ( ! $egApprovedRevsAutomaticApprovals ) { |
| 66 | + return true; |
| 67 | + } |
| 68 | + |
64 | 69 | if ( !ApprovedRevs::pageIsApprovable( $title ) ) { |
65 | 70 | return true; |
66 | 71 | } |