Index: trunk/extensions/GroupPermissionsManager/GPManager_body.php |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | if( $this->target != '') { |
55 | 55 | //ok, we do. Now, what action was just being performed? |
56 | 56 | if( $wgRequest->getCheck( 'dosearch' ) || !$wgRequest->wasPosted() ) { |
57 | | - $wgOut->addScriptFile('prefs.js'); |
| 57 | + addScriptFile('prefs.js'); |
58 | 58 | //it was a search, check the group |
59 | 59 | if(in_array($this->target, $this->groupslist)) { |
60 | 60 | global $wgImplicitGroups; |
Index: trunk/extensions/GroupPermissionsManager/GPManager.i18n.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | 'grouppermissions' => 'Manage Group Permissions', |
16 | 16 | 'grouppermissions-desc' => 'Manage group permissions via a special page', |
17 | 17 | 'grouppermissions-desc2' => 'Extended permissions system', |
18 | | - 'grouppermissions-header' => "You may use this page to change the underlying permissions of the various usergroups", |
| 18 | + 'grouppermissions-header' => 'You may use this page to change the underlying permissions of the various usergroups', |
19 | 19 | 'grouppermissions-search' => 'Group:', |
20 | 20 | 'grouppermissions-dologin' => 'Login', |
21 | 21 | 'grouppermissions-dosearch' => 'Go', |
— | — | @@ -44,6 +44,9 @@ |
45 | 45 | 'grouppermissions-log-name' => 'GroupPermissions log', |
46 | 46 | 'grouppermissions-log-entry' => '', #do not translate this message |
47 | 47 | 'grouppermissions-log-header' => 'This page tracks changes to the underlying permissions of user groups', |
| 48 | + 'grouppermissions-needjs' => 'Warning: JavaScript is disabled on your browser. Some features may not work!', |
| 49 | + 'grouppermissions-sp-header' => 'You may use this page to manage how permissions are sorted and add new permissions', |
| 50 | + |
48 | 51 | 'right-viewsource' => 'View wiki source of protected pages', |
49 | 52 | 'right-raw' => 'View raw pages', |
50 | 53 | 'right-render' => 'View rendered pages without navigation', |
Index: trunk/extensions/GroupPermissionsManager/GPManager.php |
— | — | @@ -14,13 +14,17 @@ |
15 | 15 | 'name' => 'GroupPermissions Manager', |
16 | 16 | 'author' => 'Ryan Schmidt', |
17 | 17 | 'url' => 'http://www.mediawiki.org/wiki/Extension:GroupPermissions_Manager', |
| 18 | +#'version' => '3.1', |
18 | 19 | 'version' => '3.0', |
19 | 20 | 'description' => 'Manage group permissions via a special page', |
20 | 21 | 'descriptionmsg' => 'grouppermissions-desc', |
21 | 22 | ); |
22 | 23 | $wgAutoloadClasses['GroupPermissions'] = dirname(__FILE__) . '/GPManager_body.php'; |
| 24 | +#$wgAutoloadClasses['RemoveUnusedGroups'] = dirname(__FILE__) . '/RemoveUnusedGroups.php'; |
| 25 | +#$wgAutoloadClasses['SortPermissions'] = dirname(__FILE__) . '/SortPermissions.php'; |
23 | 26 | $wgSpecialPages['GroupPermissions'] = 'GroupPermissions'; |
24 | | -$wgAvailableRights[] = 'grouppermissions'; |
| 27 | +#$wgSpecialPages['RemoveUnusedGroups'] = 'RemoveUnusedGroups'; |
| 28 | +#$wgSpecialPages['SortPermissions'] = 'SortPermissions'; |
25 | 29 | $wgExtensionMessagesFiles['GroupPermissions'] = dirname(__FILE__) . '/GPManager.i18n.php'; |
26 | 30 | |
27 | 31 | $wgLogTypes[] = 'gpmanager'; |
— | — | @@ -31,12 +35,15 @@ |
32 | 36 | $wgLogHeaders['gpmanager'] = 'grouppermissions-log-header'; |
33 | 37 | $wgLogNames['gpmanager'] = 'grouppermissions-log-name'; |
34 | 38 | $wgSpecialPageGroups['GroupPermissions'] = 'wiki'; |
| 39 | +#$wgSpecialPageGroups['RemoveUnusedGroups'] = 'user'; |
| 40 | +#$wgSpecialPageGroups['SortPermissions'] = 'wiki'; |
35 | 41 | |
36 | | -##Permission required to use the special page |
| 42 | +##Permission required to use the 'GroupPermissions' and 'SortPermissions' special page |
37 | 43 | ##By default all bureaucrats can |
38 | 44 | $wgGroupPermissions['bureaucrat']['grouppermissions'] = true; |
39 | 45 | ##Uncomment this if you want to make a separate group that can access the page as well |
40 | 46 | #$wgGroupPermissions['grouppermissions']['grouppermissions'] = true; |
| 47 | +##'RemoveUnusedGroups' requires the 'userrights' permission, also given to bureaucrats by default |
41 | 48 | |
42 | 49 | /** |
43 | 50 | * Permissions++ sub-extension |
— | — | @@ -84,7 +91,7 @@ |
85 | 92 | $wgGPManagerSort['manage'] = array( 'delete', 'bigdelete', 'deletedhistory', 'undelete', 'mergehistory', |
86 | 93 | 'protect', 'block', 'blockemail', 'hideuser', 'userrights', 'userrights-interwiki', 'rollback', 'markbotedits', |
87 | 94 | 'patrol', 'editinterface', 'editusercssjs', 'hiderevision', 'deleterevision', 'browsearchive', 'suppressrevision', |
88 | | -'suppressionlog' ); |
| 95 | +'suppressionlog', 'suppress' ); |
89 | 96 | $wgGPManagerSort['admin'] = array( 'siteadmin', 'import', 'importupload', 'trackback', 'unwatchedpages', |
90 | 97 | 'grouppermissions' ); |
91 | 98 | $wgGPManagerSort['tech'] = array( 'bot', 'purge', 'minoredit', 'nominornewtalk', 'ipblock-exempt', |
— | — | @@ -253,4 +260,16 @@ |
254 | 261 | } else { |
255 | 262 | return false; |
256 | 263 | } |
257 | | -} |
\ No newline at end of file |
| 264 | +} |
| 265 | + |
| 266 | +//was added in 1.13, so supporting for downwards compatibility with 1.12 |
| 267 | +function addScriptFile( $file ) { |
| 268 | + global $wgStylePath, $wgStyleVersion, $wgJsMimeType; |
| 269 | + if( substr( $file, 0, 1 ) == '/' ) { |
| 270 | + $path = $file; |
| 271 | + } else { |
| 272 | + $path = "{$wgStylePath}/common/{$file}"; |
| 273 | + } |
| 274 | + $encPath = htmlspecialchars( $path ); |
| 275 | + $this->addScript( "<script type=\"{$wgJsMimeType}\" src=\"$path?$wgStyleVersion\"></script>\n" ); |
| 276 | + } |
\ No newline at end of file |