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.3 - 8 September 2008 |
| 6 | + (bug 14744) Custom rights defined in $wgRestrictionLevels are now configurable |
| 7 | + in $wgGroupPermissions (require MediaWiki 1.13+). |
| 8 | + |
5 | 9 | 0.7.2 - 7 September 2008 |
6 | 10 | Added $wgEnableImageWhitelist and $wgSpecialPageCacheUpdates. |
7 | 11 | |
Index: trunk/extensions/Configure/Configure.func.php |
— | — | @@ -108,3 +108,14 @@ |
109 | 109 | } while( $code = Language::getFallbackFor( $code ) ); |
110 | 110 | return true; |
111 | 111 | } |
| 112 | + |
| 113 | +/** |
| 114 | + * Add custom rights defined in $wgRestrictionLevels |
| 115 | + * Note that this only works on 1.13+ |
| 116 | + */ |
| 117 | +function efConfigureGetAllRights( &$rights ){ |
| 118 | + global $wgRestrictionLevels; |
| 119 | + $newrights = array_diff( $wgRestrictionLevels, array( '', 'sysop' ) ); // Pseudo rights |
| 120 | + $rights = array_unique( array_merge( $rights, $newrights ) ); |
| 121 | + return true; |
| 122 | +} |
\ No newline at end of file |
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.2', |
| 21 | + 'version' => '0.7.3', |
22 | 22 | ); |
23 | 23 | |
24 | 24 | ## Configuration part |
— | — | @@ -133,6 +133,9 @@ |
134 | 134 | $wgHooks['LangugeGetSpecialPageAliases'][] = 'efConfigureLoadAliases'; |
135 | 135 | } |
136 | 136 | |
| 137 | +## Add custom rights defined in $wgRestrictionLevels |
| 138 | +$wgHooks['UserGetAllRights'][] = 'efConfigureGetAllRights'; |
| 139 | + |
137 | 140 | ## Adding the new special pages... |
138 | 141 | ## Common code |
139 | 142 | $wgAutoloadClasses['ConfigurationPage'] = $dir . 'Configure.page.php'; |