Index: trunk/extensions/Configure/findSettings.php |
— | — | @@ -26,10 +26,11 @@ |
27 | 27 | echo "Script that find settings that aren't configurable by the extension.\n"; |
28 | 28 | echo "\n"; |
29 | 29 | echo "Usage:\n"; |
30 | | - echo " php findSettings.php [--help|--from-doc [--alpha]]\n"; |
| 30 | + echo " php findSettings.php [--help|--ext|--from-doc [--alpha]]\n"; |
31 | 31 | echo "\n"; |
32 | 32 | echo "options:\n"; |
33 | 33 | echo "--help: display this screen\n"; |
| 34 | + echo "--ext: search for extensions settings\n"; |
34 | 35 | echo "--from-doc: compare with settings from mediawiki.org instead settings\n"; |
35 | 36 | echo " from this extension\n"; |
36 | 37 | echo "--alpha: get the alphabetical list of settings\n"; |
— | — | @@ -53,38 +54,79 @@ |
54 | 55 | if( isset( $options['help'] ) ) |
55 | 56 | printHelp(); |
56 | 57 | |
57 | | -// Get our settings defs |
58 | | -if( isset( $options['from-doc'] ) ){ |
59 | | - if( isset( $options['alpha'] ) ){ |
60 | | - $page = "Manual:Configuration_settings_(alphabetical)"; |
| 58 | +$coreSettings = ConfigurationSettings::singleton( CONF_SETTINGS_CORE ); |
| 59 | +if( isset( $options['ext'] ) ){ |
| 60 | + $exts = ConfigurationSettings::singleton( CONF_SETTINGS_EXT )->getAllExtensionsObjects(); |
| 61 | + $ingnoreList = array( |
| 62 | + # Core |
| 63 | + 'wgTitle', 'wgArticle', 'wgContLang', 'wgLang', 'wgOut', 'wgParser', 'wgMessageCache', |
| 64 | + # Extensions |
| 65 | + 'wgCaptcha', 'wgConfirmEditIP', |
| 66 | + 'wgCitationCache', 'wgCitationCounter', 'wgCitationRunning', |
| 67 | + 'wgCSS', |
| 68 | + 'wgErrorHandlerErrors', 'wgErrorHandlerOutputDone', |
| 69 | + 'wgExtParserFunctions', |
| 70 | + 'wgTitleBlacklist', |
| 71 | + ); |
| 72 | + foreach( $exts as $ext ){ |
| 73 | + if( !$ext->isInstalled() ) |
| 74 | + continue; |
| 75 | + $file = file_get_contents( $ext->getFile() ); |
| 76 | + $name = $ext->getName(); |
| 77 | + $m = array(); |
| 78 | + preg_match_all( '/\$(wg[A-Za-z0-9]+)\s*\=/', $file, $m ); |
| 79 | + $definedSettings = array_unique( $m[1] ); |
| 80 | + $allSettings = array_keys( $ext->getSettings() ); |
| 81 | + |
| 82 | + $remain = array_diff( $definedSettings, $allSettings ); |
| 83 | + $obsolete = array_diff( $allSettings, $definedSettings ); |
| 84 | + $missing = array(); |
| 85 | + foreach( $remain as $setting ){ |
| 86 | + if( !$coreSettings->isSettingAvailable( $setting ) && !in_array( $setting, $ingnoreList ) ) |
| 87 | + $missing[] = $setting; |
| 88 | + } |
| 89 | + if( count( $missing ) == 0 && count( $obsolete ) == 0 ) { |
| 90 | + #echo "Extension $name ok\n"; |
| 91 | + } else { |
| 92 | + echo "Extension $name:\n"; |
| 93 | + printArray( ' missing', $missing ); |
| 94 | + printArray( ' obsolete', $obsolete ); |
| 95 | + } |
| 96 | + } |
| 97 | +} else { |
| 98 | + // Get our settings defs |
| 99 | + if( isset( $options['from-doc'] ) ){ |
| 100 | + if( isset( $options['alpha'] ) ){ |
| 101 | + $page = "Manual:Configuration_settings_(alphabetical)"; |
| 102 | + } else { |
| 103 | + $page = "Manual:Configuration_settings"; |
| 104 | + } |
| 105 | + $cont = Http::get( "http://www.mediawiki.org/w/index.php?title={$page}&action=raw" ); |
| 106 | + $m = array(); |
| 107 | + preg_match_all( '/\[\[[Mm]anual:\$(wg[A-Za-z0-9]+)\|/', $cont, $m ); |
| 108 | + $allSettings = array_unique( $m[1] ); |
61 | 109 | } else { |
62 | | - $page = "Manual:Configuration_settings"; |
| 110 | + $allSettings = array_keys( $coreSettings->getAllSettings() ); |
63 | 111 | } |
64 | | - $cont = Http::get( "http://www.mediawiki.org/w/index.php?title={$page}&action=raw" ); |
| 112 | + |
| 113 | + // Now we'll need to open DefaultSettings.php |
65 | 114 | $m = array(); |
66 | | - preg_match_all( '/\[\[[Mm]anual:\$(wg[A-Za-z0-9]+)\|/', $cont, $m ); |
67 | | - $allSettings = array_unique( $m[1] ); |
68 | | -} else { |
69 | | - $allSettings = array_keys( ConfigurationSettings::singleton( CONF_SETTINGS_CORE )->getAllSettings() ); |
70 | | -} |
71 | | - |
72 | | -// Now we'll need to open DefaultSettings.php |
73 | | -$m = array(); |
74 | | -$defaultSettings = file_get_contents( "$IP/includes/DefaultSettings.php" ); |
75 | | -preg_match_all( '/\$(wg[A-Za-z0-9]+)\s*\=/', $defaultSettings, $m ); |
76 | | -$definedSettings = array_unique( $m[1] ); |
77 | | - |
78 | | -$missing = array_diff( $definedSettings, $allSettings ); |
79 | | -$remain = array_diff( $allSettings, $definedSettings ); |
80 | | -$obsolete = array(); |
81 | | -foreach( $remain as $setting ){ |
82 | | - if( ConfigurationSettings::singleton( CONF_SETTINGS_CORE )->isSettingAvailable( $setting ) ) |
83 | | - $obsolete[] = $setting; |
84 | | -} |
85 | | - |
86 | | -// let's show the results: |
87 | | -printArray('missing', $missing ); |
88 | | -printArray('obsolete', $obsolete ); |
89 | | - |
90 | | -if( count( $missing ) == 0 && count( $obsolete ) == 0 ) |
91 | | - echo "Looks good!\n"; |
\ No newline at end of file |
| 115 | + $defaultSettings = file_get_contents( "$IP/includes/DefaultSettings.php" ); |
| 116 | + preg_match_all( '/\$(wg[A-Za-z0-9]+)\s*\=/', $defaultSettings, $m ); |
| 117 | + $definedSettings = array_unique( $m[1] ); |
| 118 | + |
| 119 | + $missing = array_diff( $definedSettings, $allSettings ); |
| 120 | + $remain = array_diff( $allSettings, $definedSettings ); |
| 121 | + $obsolete = array(); |
| 122 | + foreach( $remain as $setting ){ |
| 123 | + if( $coreSettings->isSettingAvailable( $setting ) ) |
| 124 | + $obsolete[] = $setting; |
| 125 | + } |
| 126 | + |
| 127 | + // let's show the results: |
| 128 | + printArray('missing', $missing ); |
| 129 | + printArray('obsolete', $obsolete ); |
| 130 | + |
| 131 | + if( count( $missing ) == 0 && count( $obsolete ) == 0 ) |
| 132 | + echo "Looks good!\n"; |
| 133 | +} |
\ No newline at end of file |
Index: trunk/extensions/Configure/CHANGELOG |
— | — | @@ -1,6 +1,10 @@ |
2 | 2 | This file lists changes on this extension. |
3 | 3 | Localisation updates are done on betawiki and aren't listed here. |
4 | 4 | |
| 5 | +0.7.10 - 21 September 2008 |
| 6 | + * findSettings.php now works for extensions (--ext option) |
| 7 | + * Updated extensions settings |
| 8 | + |
5 | 9 | 0.7.9 - 20 September 2008 |
6 | 10 | Dropped $wgDBminWordLen, was obsolete since MediaWiki 1.6.0. |
7 | 11 | |
Index: trunk/extensions/Configure/Configure.settings-ext.php |
— | — | @@ -24,7 +24,18 @@ |
25 | 25 | 'name' => 'AbuseFilter', |
26 | 26 | 'settings' => array( |
27 | 27 | 'wgAbuseFilterAvailableActions' => 'array', |
| 28 | + 'wgAbuseFilterConditionLimit' => 'int', |
| 29 | + 'wgAbuseFilterEmergencyDisableThreshold' => 'text', // FIXME: float |
| 30 | + 'wgAbuseFilterEmergencyDisableCount' => 'int', |
| 31 | + 'wgAbuseFilterEmergencyDisableAge' => 'int', |
| 32 | + 'wgAbuseFilterParserClass' => 'text', |
| 33 | + 'wgAbuseFilterNativeParser' => 'text', |
| 34 | + 'wgAbuseFilterNativeSyntaxCheck' => 'text', |
| 35 | + 'wgAbuseFilterNativeExpressionEvaluator' => 'text', |
28 | 36 | ), |
| 37 | + 'array' => array( |
| 38 | + 'wgAbuseFilterAvailableActions' => 'simple', |
| 39 | + ), |
29 | 40 | 'schema' => true, |
30 | 41 | 'url' => 'http://www.mediawiki.org/wiki/Extension:AbuseFilter', |
31 | 42 | ), |
— | — | @@ -111,6 +122,9 @@ |
112 | 123 | ), |
113 | 124 | array( |
114 | 125 | 'name' => 'BadImage', |
| 126 | + 'settings' => array( |
| 127 | + 'wgBadImageCache' => 'bool', |
| 128 | + ), |
115 | 129 | 'schema' => true, |
116 | 130 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Bad_Image_List', |
117 | 131 | ), |
— | — | @@ -210,10 +224,14 @@ |
211 | 225 | 'wgCategoryTreeUnifiedView' => 'bool', |
212 | 226 | 'wgCategoryTreeMaxDepth' => 'array', |
213 | 227 | 'wgCategoryTreeExtPath' => 'text', |
| 228 | + #'wgCategoryTreeVersion' => 'int', |
| 229 | + #'wgCategoryTreeUseCategoryTable' => 'bool', |
| 230 | + 'wgCategoryTreeOmitNamespace' => array( 0 => 'Never', 10 => 'Always', 20 => 'Category', 30 => 'Auto' ), |
214 | 231 | 'wgCategoryTreeDefaultMode' => array( 0 => 'Categories', 10 => 'Pages', 20 => 'All' ), |
215 | 232 | 'wgCategoryTreeCategoryPageMode' => array( 0 => 'Categories', 10 => 'Pages', 20 => 'All' ), |
216 | 233 | 'wgCategoryTreeDefaultOptions' => 'array', |
217 | 234 | 'wgCategoryTreeCategoryPageOptions' => 'array', |
| 235 | + 'wgCategoryTreeSpecialPageOptions' => 'array', |
218 | 236 | 'wgCategoryTreeSidebarOptions' => 'array', |
219 | 237 | 'wgCategoryTreePageCategoryOptions' => 'array', |
220 | 238 | ), |
— | — | @@ -221,6 +239,7 @@ |
222 | 240 | 'wgCategoryTreeMaxDepth' => 'assoc', |
223 | 241 | 'wgCategoryTreeDefaultOptions' => 'assoc', |
224 | 242 | 'wgCategoryTreeCategoryPageOptions' => 'assoc', |
| 243 | + 'wgCategoryTreeSpecialPageOptions' => 'assoc', |
225 | 244 | 'wgCategoryTreeSidebarOptions' => 'assoc', |
226 | 245 | 'wgCategoryTreePageCategoryOptions' => 'assoc', |
227 | 246 | ), |
— | — | @@ -287,6 +306,7 @@ |
288 | 307 | 'settings' => array( |
289 | 308 | 'wgCheckUserLog' => 'text', |
290 | 309 | 'wgCUDMaxAge' => 'int', |
| 310 | + 'wgCheckUserMaxBlocks' => 'int', |
291 | 311 | ), |
292 | 312 | 'url' => 'http://www.mediawiki.org/wiki/Extension:CheckUser', |
293 | 313 | ), |
— | — | @@ -303,6 +323,9 @@ |
304 | 324 | ), |
305 | 325 | array( |
306 | 326 | 'name' => 'Citation', |
| 327 | + 'settings' => array( |
| 328 | + |
| 329 | + ), |
307 | 330 | ), |
308 | 331 | array( |
309 | 332 | 'name' => 'Cite', |
— | — | @@ -331,12 +354,12 @@ |
332 | 355 | array( |
333 | 356 | 'name' => 'Collection', |
334 | 357 | 'settings' => array( |
335 | | - 'wgCollectionStartPage' => 'text', |
336 | 358 | 'wgCollectionMWServeURL' => 'text', |
337 | 359 | 'wgCollectionMWServeCredentials' => 'text', |
338 | 360 | 'wgCommunityCollectionNamespace' => 'int', |
339 | | - 'wgSharedBaseURL' => 'text', |
340 | | - 'wgLicenseArticle' => 'text', |
| 361 | + 'wgCollectionMaxArticles' => 'int', |
| 362 | + 'wgLicenseName' => 'text', |
| 363 | + 'wgLicenseURL' => 'text', |
341 | 364 | 'wgPDFTemplateBlacklist' => 'text', |
342 | 365 | 'wgCollectionTemplateExclusionCategory' => 'text', |
343 | 366 | 'wgCollectionFormats' => 'array', |
— | — | @@ -345,6 +368,10 @@ |
346 | 369 | 'array' => array( |
347 | 370 | 'wgCollectionFormats' => 'assoc', |
348 | 371 | ), |
| 372 | + 'empty' => array( |
| 373 | + 'wgLicenseName' => null, |
| 374 | + 'wgLicenseURL' => null, |
| 375 | + ), |
349 | 376 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Collection', |
350 | 377 | ), |
351 | 378 | array( |
— | — | @@ -399,12 +426,22 @@ |
400 | 427 | 'name' => 'ConfirmEdit', |
401 | 428 | 'settings' => array( |
402 | 429 | 'wgCaptchaClass' => 'text', |
| 430 | + 'wgCaptchaWhitelistIP' => 'array', |
403 | 431 | 'wgCaptchaTriggers' => 'array', |
404 | 432 | 'wgCaptchaTriggersOnNamespace' => 'array', |
| 433 | + 'wgCaptchaStorageClass' => 'text', |
| 434 | + 'wgCaptchaSessionExpiration' => 'int', |
| 435 | + 'wgCaptchaBadLoginExpiration' => 'int', |
| 436 | + 'ceAllowConfirmedEmail' => 'bool', |
| 437 | + 'wgCaptchaBadLoginAttempts' => 'int', |
| 438 | + 'wgCaptchaWhitelist' => 'text', |
| 439 | + 'wgCaptchaRegexes' => 'array', |
405 | 440 | ), |
406 | 441 | 'array' => array( |
| 442 | + 'wgCaptchaWhitelistIP' => 'simple', |
407 | 443 | 'wgCaptchaTriggers' => 'assoc', |
408 | 444 | 'wgCaptchaTriggersOnNamespace' => 'array', |
| 445 | + 'wgCaptchaRegexes' => 'simple', |
409 | 446 | ), |
410 | 447 | 'url' => 'http://www.mediawiki.org/wiki/Extension:ConfirmEdit', |
411 | 448 | ), |
— | — | @@ -449,6 +486,10 @@ |
450 | 487 | ), |
451 | 488 | array( |
452 | 489 | 'name' => 'Contributors', |
| 490 | + 'settings' => array( |
| 491 | + 'wgContributorsLimit' => 'int', |
| 492 | + 'wgContributorsThreshold' => 'int', |
| 493 | + ), |
453 | 494 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Contributors', |
454 | 495 | 'schema' => true, |
455 | 496 | ), |
— | — | @@ -555,11 +596,13 @@ |
556 | 597 | 'wgFlaggedRevsPatrolNamespaces' => 'array', |
557 | 598 | 'wgFlaggedRevsWhitelist' => 'array', |
558 | 599 | 'wgFlaggedRevsOverride' => 'bool', |
| 600 | + 'wgFlaggedRevsReviewForDefault' => 'bool', |
559 | 601 | 'wgFlaggedRevsPrecedence' => 'bool', |
560 | 602 | 'wgFlaggedRevsExceptions' => 'array', |
561 | 603 | 'wgFlaggedRevsComments' => 'bool', |
562 | 604 | 'wgReviewChangesAfterEdit' => 'bool', |
563 | 605 | 'wgFlaggedRevsAutoReview' => 'bool', |
| 606 | + 'wgFlaggedRevsAutoReviewNew' => 'bool', |
564 | 607 | 'wgUseStableTemplates' => 'bool', |
565 | 608 | 'wgUseCurrentTemplates' => 'bool', |
566 | 609 | 'wgUseStableImages' => 'bool', |
— | — | @@ -569,11 +612,11 @@ |
570 | 613 | 'wgFlaggedRevPristine' => 'int', |
571 | 614 | 'wgFlagRestrictions' => 'array', |
572 | 615 | 'wgReviewCodes' => 'array', |
| 616 | + 'wgFlaggedRevsStylePath' => 'text', |
573 | 617 | 'wgFlaggedRevsAutopromote' => 'array', |
574 | 618 | 'wgFlaggedRevsExternalStore' => 'array', |
575 | 619 | 'wgFlaggedRevsLogInRC' => 'bool', |
576 | 620 | 'wgFlaggedRevsOversightAge' => 'int', |
577 | | - 'wgFlaggedRevsLongPending' => 'array', |
578 | 621 | 'wgFlaggedRevsBacklog' => 'int', |
579 | 622 | 'wgFlaggedRevsVisible' => 'array', |
580 | 623 | 'wgFlaggedRevsTalkVisible' => 'bool', |
— | — | @@ -582,6 +625,7 @@ |
583 | 626 | 'wgFlaggedRevsFeedbackAge' => 'int', |
584 | 627 | 'wgFlaggedRevsStatsAge' => 'int', |
585 | 628 | 'wgPHPlotDir' => 'text', |
| 629 | + 'wgSvgGraphDir' => 'text', |
586 | 630 | ), |
587 | 631 | 'array' => array( |
588 | 632 | 'wgFlaggedRevsNamespaces' => 'ns-simple', |
— | — | @@ -593,7 +637,6 @@ |
594 | 638 | 'wgReviewCodes' => 'simple', |
595 | 639 | 'wgFlaggedRevsAutopromote' => 'assoc', |
596 | 640 | 'wgFlaggedRevsExternalStore' => 'simple', |
597 | | - 'wgFlaggedRevsLongPending' => 'simple', |
598 | 641 | 'wgFlaggedRevsVisible' => 'simple', |
599 | 642 | 'wgFeedbackNamespaces' => 'ns-simple', |
600 | 643 | 'wgFlaggedRevsFeedbackTags' => 'assoc', |
— | — | @@ -772,6 +815,14 @@ |
773 | 816 | ), |
774 | 817 | array( |
775 | 818 | 'name' => 'TitleBlacklist', |
| 819 | + 'settings' => array( |
| 820 | + 'wgTitleBlacklistCaching' => 'array', |
| 821 | + 'wgTitleBlacklistSources' => 'array', |
| 822 | + ), |
| 823 | + 'array' => array( |
| 824 | + 'wgTitleBlacklistCaching' => 'assoc', |
| 825 | + 'wgTitleBlacklistSources' => 'array', |
| 826 | + ), |
776 | 827 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Title_Blacklist', |
777 | 828 | ), |
778 | 829 | array( |
— | — | @@ -812,9 +863,11 @@ |
813 | 864 | 'wgTranslateGroupStructure' => 'array', |
814 | 865 | 'wgTranslateAddMWExtensionGroups' => 'bool', |
815 | 866 | 'wgTranslateEC' => 'array', |
| 867 | + 'wgTranslateCC' => 'array', |
816 | 868 | 'wgTranslateTasks' => 'array', |
817 | 869 | 'wgTranslatePHPlot' => 'text', |
818 | 870 | 'wgTranslatePHPlotFont' => 'text', |
| 871 | + 'wgTranslateTagTranslationLocation' => 'array', |
819 | 872 | ), |
820 | 873 | 'array' => array( |
821 | 874 | 'wgTranslateLanguageFallbacks' => 'assoc', |
— | — | @@ -824,7 +877,9 @@ |
825 | 878 | 'wgTranslateAC' => 'assoc', |
826 | 879 | 'wgTranslateGroupStructure' => 'array', |
827 | 880 | 'wgTranslateEC' => 'simple', |
| 881 | + 'wgTranslateCC' => 'assoc', |
828 | 882 | 'wgTranslateTasks' => 'assoc', |
| 883 | + 'wgTranslateTagTranslationLocation' => 'simple', |
829 | 884 | ), |
830 | 885 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Translate', |
831 | 886 | ), |
Index: trunk/extensions/Configure/Configure.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure', |
19 | 19 | 'description' => 'Allow authorised users to configure the wiki by a web-based interface', |
20 | 20 | 'descriptionmsg' => 'configure-desc', |
21 | | - 'version' => '0.7.9', |
| 21 | + 'version' => '0.7.10', |
22 | 22 | ); |
23 | 23 | |
24 | 24 | ## Configuration part |