Index: trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationUtil.php |
— | — | @@ -12,22 +12,15 @@ |
13 | 13 | * @return bool whether or not it is. |
14 | 14 | */ |
15 | 15 | public static function isEnabled() { |
16 | | - global $wgUser, $wgArticleCreationRegistrationCutoff; |
| 16 | + global $wgUser, $wgArticleCreationRegistrationCutoff, |
| 17 | + $wgArticleCreationBucketConfig; |
17 | 18 | |
18 | 19 | $userRegistration = wfTimestamp( TS_MW, $wgUser->getRegistration() ); |
19 | 20 | |
20 | | - $bucketConfig = array( |
21 | | - 'buckets' => array( |
22 | | - 'on' => 99, |
23 | | - 'off' => 1, |
24 | | - ), |
25 | | - 'version' => 1, |
26 | | - ); |
27 | | - |
28 | 21 | if ( !$userRegistration || |
29 | 22 | $userRegistration > $wgArticleCreationRegistrationCutoff |
30 | 23 | ) { |
31 | | - $bucket = PHPBucket::getBucket( 'ac-enabled', $bucketConfig ); |
| 24 | + $bucket = PHPBucket::getBucket( 'ac-enabled', $wgArticleCreationBucketConfig ); |
32 | 25 | |
33 | 26 | return $bucket === 'on'; |
34 | 27 | } else { |
Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php |
— | — | @@ -176,4 +176,12 @@ |
177 | 177 | 'buttons' => $wgArticleCreationButtons, |
178 | 178 | ); |
179 | 179 | |
| 180 | +$wgArticleCreationBucketConfig = array( |
| 181 | + 'buckets' => array( |
| 182 | + 'on' => 1, |
| 183 | + 'off' => 99, |
| 184 | + ), |
| 185 | + 'version' => 1, |
| 186 | +); |
| 187 | + |
180 | 188 | $wgArticleCreationRegistrationCutoff = '20110205121212'; |