Index: trunk/extensions/Configure/Configure.settings.php |
— | — | @@ -1,6 +1,5 @@ |
2 | 2 | <?php |
3 | 3 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
4 | | - |
5 | 4 | /** |
6 | 5 | * @file |
7 | 6 | * @ingroup Extensions |
— | — | @@ -341,6 +340,14 @@ |
342 | 341 | 'wgSpamRegex' => 'text', |
343 | 342 | 'wgWhitelistRead' => 'array', |
344 | 343 | ), |
| 344 | + 'block' => array( |
| 345 | + 'wgBlockAllowsUTEdit' => 'bool', |
| 346 | + 'wgSysopEmailBans' => 'bool', |
| 347 | + 'wgSysopRangeBans' => 'bool', |
| 348 | + 'wgSysopUserBans' => 'bool', |
| 349 | + ), |
| 350 | + ), |
| 351 | + 'groups' => array( |
345 | 352 | 'groups' => array( |
346 | 353 | 'wgGroupPermissions' => 'array', |
347 | 354 | 'wgAddGroups' => 'array', |
— | — | @@ -348,12 +355,6 @@ |
349 | 356 | 'wgGroupsAddToSelf' => 'array', |
350 | 357 | 'wgGroupsRemoveFromSelf' => 'array', |
351 | 358 | ), |
352 | | - 'block' => array( |
353 | | - 'wgBlockAllowsUTEdit' => 'bool', |
354 | | - 'wgSysopEmailBans' => 'bool', |
355 | | - 'wgSysopRangeBans' => 'bool', |
356 | | - 'wgSysopUserBans' => 'bool', |
357 | | - ), |
358 | 359 | ), |
359 | 360 | 'rates' => array( |
360 | 361 | 'rates' => array( |
— | — | @@ -408,6 +409,7 @@ |
409 | 410 | 'wgDisableSearchUpdate' => 'bool', |
410 | 411 | 'wgDisableTextSearch' => 'bool', |
411 | 412 | 'wgAPIMaxDBRows' => 'int', |
| 413 | + 'wgMaximumMovedPages' => 'int', |
412 | 414 | 'wgMiserMode' => 'bool', |
413 | 415 | 'wgShowHostnames' => 'bool', |
414 | 416 | 'wgUseDumbLinkUpdate' => 'bool', |
— | — | @@ -676,10 +678,11 @@ |
677 | 679 | * |
678 | 680 | * Types used: |
679 | 681 | * - simple: single dimension array with numeric key |
680 | | - * - assoc: single dimension array with associative key => val |
681 | | - * - ns-bool: single dimension array with namespaces numbers in the key and a |
682 | | - * boolean value |
683 | | - * - ns-text: same as ns-bool but with a string in the value |
| 682 | + * - assoc: single dimension array with associative key => val |
| 683 | + * - ns-bool: single dimension array with namespaces numbers in the key and a |
| 684 | + * boolean value |
| 685 | + * - ns-text: same as ns-bool but with a string in the value |
| 686 | + * - ns-simple: like simple, but values are restricted to namespaces index |
684 | 687 | * - group-bool: two dimensions array with group name in first key, right name |
685 | 688 | * in the second and boolean value |
686 | 689 | * - group-array: two dimensions array with group name in first key and then |
— | — | @@ -719,6 +722,7 @@ |
720 | 723 | 'wgNamespacesWithSubpages' => 'ns-bool', |
721 | 724 | 'wgNoFollowNsExceptions' => 'ns-text', |
722 | 725 | 'wgNonincludableNamespaces' => 'ns-bool', |
| 726 | + 'wgSitemapNamespaces' => 'ns-simple', |
723 | 727 | 'wgArticleRobotPolicies' => 'assoc', |
724 | 728 | # Skins |
725 | 729 | 'wgSkipSkins' => 'simple', |
— | — | @@ -798,7 +802,6 @@ |
799 | 803 | 'wgGrammarForms' => 'array', |
800 | 804 | 'wgRedirectSources' => 'simple', |
801 | 805 | 'wgRestrictionTypes' => 'simple', |
802 | | - 'wgSitemapNamespaces' => 'simple', |
803 | 806 | ); |
804 | 807 | |
805 | 808 | /** |
— | — | @@ -1097,6 +1100,7 @@ |
1098 | 1101 | 'wgRCFilterByAge' => array( array( '1.13alpha', '>=' ) ), |
1099 | 1102 | 'wgRCLinkLimits' => array( array( '1.13alpha', '>=' ) ), |
1100 | 1103 | 'wgRCLinkDays' => array( array( '1.13alpha', '>=' ) ), |
| 1104 | + 'wgMaximumMovedPages' => array( array( '1.13alpha', '>=' ) ), |
1101 | 1105 | ## Obsolete |
1102 | 1106 | 'wgProfileSampleRate' => array( array( '1.8alpha', '<' ) ), |
1103 | 1107 | 'wgProfilerType' => array( array( '1.8alpha', '<' ) ), |
Index: trunk/extensions/Configure/CHANGELOG |
— | — | @@ -1,6 +1,11 @@ |
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.3.3 - 23 May 2008 |
| 6 | + * Link setting to documentation on www.mediawiki.org |
| 7 | + * Added $wgMaximumMovedPages |
| 8 | + * $wgSitemapNamespaces now looks like other namespace settings |
| 9 | + |
5 | 10 | 0.3.2 - 22 May 2008 |
6 | 11 | Added Special:ViewConfig to allow sysop by default to see the current |
7 | 12 | configuration |
Index: trunk/extensions/Configure/Configure.php |
— | — | @@ -17,15 +17,20 @@ |
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.3.2', |
| 21 | + 'version' => '0.3.3', |
22 | 22 | ); |
23 | 23 | |
24 | 24 | ## Adding new rights... |
25 | 25 | $wgAvailableRights[] = 'configure'; |
26 | 26 | $wgAvailableRights[] = 'configure-all'; |
| 27 | +$wgAvailableRights[] = 'viewconfig'; |
| 28 | +$wgAvailableRights[] = 'viewconfig-all'; |
| 29 | + |
| 30 | +## Rights for Special:Configure |
27 | 31 | $wgGroupPermissions['bureaucrat']['configure'] = true; |
28 | 32 | #$wgGroupPermissions['developer']['configure-all'] = true; |
29 | 33 | |
| 34 | +## Rights for Special:ViewConfig |
30 | 35 | $wgGroupPermissions['sysop']['viewconfig'] = true; |
31 | 36 | $wgGroupPermissions['bureaucrat']['viewconfig-all'] = true; |
32 | 37 | |
— | — | @@ -54,4 +59,4 @@ |
55 | 60 | $wgConfigureFilesPath = "$IP/serialized"; |
56 | 61 | |
57 | 62 | ## Styles versions |
58 | | -$wgConfigureStyleVersion = '1'; |
\ No newline at end of file |
| 63 | +$wgConfigureStyleVersion = '2'; |
\ No newline at end of file |
Index: trunk/extensions/Configure/Configure.css |
— | — | @@ -29,6 +29,19 @@ |
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
| 33 | + * links |
| 34 | + */ |
| 35 | +a.configure-doc, |
| 36 | +a.configure-doc:hover, |
| 37 | +a.configure-doc:active { |
| 38 | + color: #021488; |
| 39 | +} |
| 40 | + |
| 41 | +a.configure-doc:visited { |
| 42 | + color: #0318d8; |
| 43 | +} |
| 44 | + |
| 45 | +/** |
33 | 46 | * disabled settings |
34 | 47 | */ |
35 | 48 | td.disabled > hr { |
Index: trunk/extensions/Configure/SpecialConfigure.php |
— | — | @@ -285,6 +285,15 @@ |
286 | 286 | } |
287 | 287 | $settings[$name] = $arr; |
288 | 288 | break; |
| 289 | + case 'ns-simple': |
| 290 | + global $wgContLang; |
| 291 | + $arr = array(); |
| 292 | + foreach( $wgContLang->getNamespaces() as $ns => $unused ){ |
| 293 | + if( $wgRequest->getCheck( 'wp' . $name . '-ns' . strval( $ns ) ) ) |
| 294 | + $arr[] = $ns; |
| 295 | + } |
| 296 | + $settings[$name] = $arr; |
| 297 | + break; |
289 | 298 | case 'ns-array': |
290 | 299 | global $wgContLang; |
291 | 300 | $arr = array(); |
— | — | @@ -653,7 +662,7 @@ |
654 | 663 | $text .= "</textarea>\n"; |
655 | 664 | return $text; |
656 | 665 | } |
657 | | - if( $type == 'ns-bool' ){ |
| 666 | + if( $type == 'ns-bool' || $type == 'ns-simple' ){ |
658 | 667 | global $wgContLang; |
659 | 668 | $text = ''; |
660 | 669 | $attr = ( !$allowed ) ? array( 'disabled' => 'disabled' ) : array(); |
— | — | @@ -662,11 +671,16 @@ |
663 | 672 | if( '' == $name ) { |
664 | 673 | $name = wfMsgExt( 'blanknamespace', array( 'parseinline' ) ); |
665 | 674 | } |
| 675 | + if( $type == 'ns-bool' ){ |
| 676 | + $checked = isset( $default[$ns] ) && $default[$ns]; |
| 677 | + } else { |
| 678 | + $checked = in_array( $ns, (array)$default ); |
| 679 | + } |
666 | 680 | $text .= Xml::checkLabel( |
667 | 681 | $name, |
668 | 682 | "wp{$conf}-ns{$ns}", |
669 | 683 | "wp{$conf}-ns{$ns}", |
670 | | - ( isset( $default[$ns] ) && $default[$ns] ), |
| 684 | + $checked, |
671 | 685 | $attr |
672 | 686 | ) . "\n"; |
673 | 687 | } |
— | — | @@ -790,7 +804,9 @@ |
791 | 805 | $msgVal = wfMsgExt( $msg, array( 'parseinline' ) ); |
792 | 806 | if( wfEmptyMsg( $msg, $msgVal ) ) |
793 | 807 | $msgVal = "\$$conf"; |
794 | | - $td1 = Xml::openElement( 'td', $align ) . $msgVal . '</td>'; |
| 808 | + $url = 'http://www.mediawiki.org/wiki/Manual:$' . $conf; |
| 809 | + $link = Xml::element( 'a', array( 'href' => $url, 'class' => 'configure-doc' ), $msgVal ); |
| 810 | + $td1 = Xml::openElement( 'td', $align ) . $link . '</td>'; |
795 | 811 | if( $this->isSettingAvailable( $conf ) ) |
796 | 812 | $td2 = Xml::openElement( 'td', $align ) . $this->buildInput( $conf, $type, $default ) . '</td>'; |
797 | 813 | else |