r41529 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41528‎ | r41529 | r41530 >
Date:02:58, 2 October 2008
Author:skizzerz
Status:old
Tags:
Comment:
* various bugfixes/updates for GroupPermissionsManager extension
Modified paths:
  • /trunk/extensions/GroupPermissionsManager/GroupPermissionsManager.i18n.php (modified) (history)
  • /trunk/extensions/GroupPermissionsManager/GroupPermissionsManager.php (modified) (history)
  • /trunk/extensions/GroupPermissionsManager/GroupPermissionsManager_body.php (modified) (history)
  • /trunk/extensions/GroupPermissionsManager/SortPermissions.php (modified) (history)
  • /trunk/extensions/GroupPermissionsManager/plugins/ExtendedPermissions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GroupPermissionsManager/plugins/ExtendedPermissions.php
@@ -15,7 +15,7 @@
1616 'name' => 'Extended Permissions',
1717 'author' => 'Ryan Schmidt',
1818 'url' => 'http://www.mediawiki.org/wiki/Extension:GroupPermissionsManager',
19 - 'version' => '1.3',
 19+ 'version' => '1.4',
2020 'description' => 'Extended permissions system',
2121 'descriptionmsg' => 'grouppermissions-desc2',
2222 );
@@ -167,7 +167,7 @@
168168 }
169169 }
170170 }
171 - if( ($wgRequest->getVal('diff') || $wgRequest->getVal('oldid')) && !$wgUser->isAllowed('readold') ) {
 171+ if( ($wgRequest->getVal('diff') || $wgRequest->getVal('oldid')) && !$user->isAllowed('readold') ) {
172172 //if they can't read it, they shouldn't be able to do other stuff with it anyway
173173 $result = $err;
174174 return false;
Index: trunk/extensions/GroupPermissionsManager/GroupPermissionsManager_body.php
@@ -249,7 +249,10 @@
250250 $form .= '<fieldset><legend>'.wfMsgHtml("grouppermissions-sort-$type").'</legend>';
251251 $form .= "\n<h2>".wfMsgHtml("grouppermissions-sort-$type")."</h2>\n<table>";
252252 foreach($list as $right => $value) {
253 - $msg = wfMsg('grouppermissions-display', wfMsg('right-' . $right), $right);
 253+ $rightmsg = wfMsg('right-' . $right);
 254+ if(wfEmptyMsg('right-' . $right, $rightmsg))
 255+ $rightmsg = $right;
 256+ $msg = wfMsg('grouppermissions-display', $rightmsg, $right);
254257 $form .= "\n<tr><td>$msg</td><td>";
255258 if($value) {
256259 $form .= $this->makeRadio($right, 'true', true) . $this->makeRadio($right, 'false') . $this->makeRadio($right, 'never');
Index: trunk/extensions/GroupPermissionsManager/GroupPermissionsManager.i18n.php
@@ -50,7 +50,7 @@
5151 'grouppermissions-log-name' => 'Group permissions log',
5252 'grouppermissions-log-header' => 'This page tracks changes to the underlying permissions of user groups.',
5353 'grouppermissions-needjs' => 'Warning: JavaScript is disabled on your browser. Some features may not work!',
54 - 'grouppermissions-sp-header' => 'You may use this page to manage how permissions are sorted and add new permissions.',
 54+ 'grouppermissions-sp-header' => 'You may use this page to manage how permissions are sorted and add new permissions. Hover over a permission to read its description',
5555 'grouppermissions-sp-sort' => 'Sort permissions',
5656 'grouppermissions-sp-save' => 'Save',
5757 'grouppermissions-sp-success' => 'Permissions have been successfully sorted',
@@ -61,7 +61,7 @@
6262 'grouppermissions-rug-header' => 'You may use this page to remove users from unused (deleted) groups.',
6363 'grouppermissions-rug-success' => 'Successfully removed users from unused groups!',
6464 'grouppermissions-rug-confirm' => 'Remove users from unused groups',
65 - 'right-grouppermissions' => 'Manage group permissions (special pages: [[Special:GroupPermissions|GroupPermissions]] and [[Special:SortPermissions|SortPermissions]])',
 65+ 'right-grouppermissions' => 'Manage group permissions',
6666 'right-viewsource' => 'View wiki source of protected pages',
6767 'right-raw' => 'View raw pages',
6868 'right-render' => 'View rendered pages without navigation',
@@ -174,7 +174,7 @@
175175 'grouppermissions-rug-header' => 'أنت يمكنك استخدام هذه الصفحة لإزالة المستخدمين من المجموعات غير المستخدمة (المحذوفة).',
176176 'grouppermissions-rug-success' => 'تمت إزالة المستخدمون من المجموعات غير المستخدمة بنجاح!',
177177 'grouppermissions-rug-confirm' => 'أزل المستخدمون من المجموعات غير المستخدمة',
178 - 'right-grouppermissions' => 'التحكم بسماحات المجموعة (صفحات خاصة: [[Special:GroupPermissions|سماحات المجموعة]] و [[Special:SortPermissions|ترتيب السماحات]])',
 178+ 'right-grouppermissions' => 'التحكم بسماحات المجموعة',
179179 'right-viewsource' => 'رؤية مصدر الويكي للصفحات المحمية',
180180 'right-raw' => 'رؤية الصفحات الخام',
181181 'right-render' => 'رؤية الصفحات الناتجة بدون إبحار',
@@ -242,7 +242,7 @@
243243 'grouppermissions-rug-header' => 'أنت يمكنك استخدام هذه الصفحة لإزالة المستخدمين من المجموعات غير المستخدمة (المحذوفة).',
244244 'grouppermissions-rug-success' => 'تمت إزالة المستخدمون من المجموعات غير المستخدمة بنجاح!',
245245 'grouppermissions-rug-confirm' => 'أزل المستخدمون من المجموعات غير المستخدمة',
246 - 'right-grouppermissions' => 'التحكم بسماحات المجموعة (صفحات خاصة: [[Special:GroupPermissions|سماحات المجموعة]] و [[Special:SortPermissions|ترتيب السماحات]])',
 246+ 'right-grouppermissions' => 'التحكم بسماحات المجموعة',
247247 'right-viewsource' => 'رؤية مصدر الويكى للصفحات المحمية',
248248 'right-raw' => 'رؤية الصفحات الخام',
249249 'right-render' => 'رؤية الصفحات الناتجة بدون إبحار',
@@ -360,7 +360,7 @@
361361 'grouppermissions-rug-header' => 'Auf dieser Seite kannst du Benutzer aus unbenutzten (gelöschten) Gruppen entfernen.',
362362 'grouppermissions-rug-success' => 'Benutzer wurden erfolgreich aus unbenutzten Gruppen entfernt!',
363363 'grouppermissions-rug-confirm' => 'Benutzer aus unbenutzten Gruppen entfernen',
364 - 'right-grouppermissions' => 'Gruppenrechte verwalten (Spezialseiten: [[Special:GroupPermissions|GroupPermissions]] und [[Special:SortPermissions|SortPermissions]])',
 364+ 'right-grouppermissions' => 'Gruppenrechte verwalten',
365365 'right-viewsource' => 'Wiki-Quelltext von geschützten Seiten ansehen',
366366 'right-raw' => 'Rohseiten ansehen',
367367 'right-render' => 'Gerenderte Seiten ohne Navigation ansehen',
@@ -484,7 +484,7 @@
485485 'grouppermissions-rug-header' => 'Vous pouvez utiliser cette page pour retirer les utilisateurs des groupes inutilisés ou supprimés.',
486486 'grouppermissions-rug-success' => 'Utilisateurs retirés avec succès des groupes inutilisés !',
487487 'grouppermissions-rug-confirm' => 'Retirer les utilisateurs des groupes inutilisés',
488 - 'right-grouppermissions' => 'Gère les permissions des groupes (pages spéciales : [[Special:GroupPermissions|GroupPermissions]] et [[Special:SortPermissions|SortPermissions]])',
 488+ 'right-grouppermissions' => 'Gère les permissions des groupes',
489489 'right-viewsource' => 'Voir le code source wiki des pages protégées',
490490 'right-raw' => 'Voir les pages brutes',
491491 'right-render' => 'Voir le rendu des pages sans navigation',
@@ -560,7 +560,7 @@
561561 'grouppermissions-rug-header' => 'Pode usar esta páxina para eliminar usuarios dos grupos sen uso (borrados).',
562562 'grouppermissions-rug-success' => 'Foron eliminados con éxito os usuarios dos grupos sen uso!',
563563 'grouppermissions-rug-confirm' => 'Eliminar os usuarios dos grupos sen uso',
564 - 'right-grouppermissions' => 'Xestionar os permisos de grupo (páxina especial: [[Special:GroupPermissions|Permisos de grupo]] e [[Special:SortPermissions|Tipos de permisos]])',
 564+ 'right-grouppermissions' => 'Xestionar os permisos de grupo',
565565 'right-viewsource' => 'Ver o código fonte das páxinas protexidas',
566566 'right-raw' => 'Ver as páxinas "brutas"',
567567 'right-render' => 'Ver as páxinas renderizadas sen navegación',
@@ -628,7 +628,7 @@
629629 'grouppermissions-rug-header' => 'Ovu stranicu možete koristiti za uklanjanje suradnika iz nekorištenih (izbrisanih) skupina.',
630630 'grouppermissions-rug-success' => 'Uspješno uklonjeni suradnici iz nekorištenih skupina!',
631631 'grouppermissions-rug-confirm' => 'Ukloni suradnike iz nekorištenih skupina',
632 - 'right-grouppermissions' => 'Uređivanje prava skupina (posebne stranice: [[Special:GroupPermissions|prava skupina]] i [[Special:SortPermissions|raspored prava]])',
 632+ 'right-grouppermissions' => 'Uređivanje prava skupina',
633633 'right-viewsource' => 'Gledanje izvora zaštićenih stranica',
634634 'right-raw' => 'Gledanje stranica u raw-u',
635635 'right-render' => 'Gledanje uređene stranice bez navigacije',
@@ -695,7 +695,7 @@
696696 'grouppermissions-rug-header' => 'Tu pote usar iste pagina pro remover usatores de gruppos non usate (delite).',
697697 'grouppermissions-rug-success' => 'Usatores removite con successo de gruppos non usate!',
698698 'grouppermissions-rug-confirm' => 'Remover usatores de gruppos non usate',
699 - 'right-grouppermissions' => 'Gerer permissiones de gruppos (paginas special: [[Special:GroupPermissions|GroupPermissions]] e [[Special:SortPermissions|SortPermissions]])',
 699+ 'right-grouppermissions' => 'Gerer permissiones de gruppos',
700700 'right-viewsource' => 'Vider le codice fonte wiki de paginas protegite',
701701 'right-raw' => 'Vider paginas crude',
702702 'right-render' => 'Vider le rendition de paginas sin navigaton',
@@ -762,7 +762,7 @@
763763 'grouppermissions-rug-header' => 'È possibile usare questa pagina per rimuovere utenti dai gruppi inutilizzati (cancellati).',
764764 'grouppermissions-rug-success' => 'Utenti rimossi con successo dai gruppi inutilizzati!',
765765 'grouppermissions-rug-confirm' => 'Rimuovi utenti dai gruppi inutilizzati',
766 - 'right-grouppermissions' => 'Gestisce i permessi di gruppo (pagine speciali: [[Special:GroupPermissions|Permessi di gruppo]] e [[Special:SortPermissions|Ordina permessi]])',
 766+ 'right-grouppermissions' => 'Gestisce i permessi di gruppo',
767767 'right-viewsource' => 'Visualizza il sorgente wiki di pagine protette',
768768 'right-info' => 'Visualizza le informazioni delle pagine',
769769 'right-history' => 'Visualizza le cronologie delle pagine',
@@ -948,7 +948,7 @@
949949 'grouppermissions-rug-header' => 'U kunt deze pagina gebruiken om gebruikers uit ongebruikte (verwijderde) groepen te verwijderen.',
950950 'grouppermissions-rug-success' => 'De gebruikers zijn uit de ongebruikte groepen verwijderd!',
951951 'grouppermissions-rug-confirm' => 'Gebruikers uit ongebruikte groepen verwijderen',
952 - 'right-grouppermissions' => "Groepsrechten bekeren (speciale pagina's: [[Special:GroupPermissions|groepsrechten]] en [[Special:SortPermissions|rechten sorteren]])",
 952+ 'right-grouppermissions' => "Groepsrechten bekeren",
953953 'right-viewsource' => "Brontekst van beveiligde pagina's bekijken",
954954 'right-raw' => "Ruwe pagina's bekijken",
955955 'right-render' => "Gerenderde pagina's zonder navigatie bekijken",
@@ -1016,7 +1016,7 @@
10171017 'grouppermissions-rug-header' => 'Du kan bruke denne siden for å fjerne brukere fra ubrukte (slettede) grupper.',
10181018 'grouppermissions-rug-success' => 'Fjernet brukere fra ubrukte grupper.',
10191019 'grouppermissions-rug-confirm' => 'Fjern brukere fra ubrukte grupper',
1020 - 'right-grouppermissions' => 'Behandle gruppetillatelser (spesialsider: [[Special:GroupPermissions|gruppetillatelser]] og [[Special:SortPermissions|sorter tillatelser]])',
 1020+ 'right-grouppermissions' => 'Behandle gruppetillatelser',
10211021 'right-viewsource' => 'Se kilden til beskyttede sider',
10221022 'right-raw' => 'Se sider i råformat',
10231023 'right-render' => 'Se sider uten navigasjon',
@@ -1083,7 +1083,7 @@
10841084 'grouppermissions-rug-header' => 'Podètz utilizar aquesta pagina per levar los utilizaires dels gropes inutilizats o suprimits.',
10851085 'grouppermissions-rug-success' => 'Utilizaires levats amb succès dels gropes inutilizats !',
10861086 'grouppermissions-rug-confirm' => 'Levar los utilizaires dels gropes inutilizats',
1087 - 'right-grouppermissions' => 'Gerís las permissions dels gropes (paginas especialas : [[Special:GroupPermissions|GroupPermissions]] e [[Special:SortPermissions|SortPermissions]])',
 1087+ 'right-grouppermissions' => 'Gerís las permissions dels gropes',
10881088 'right-viewsource' => 'Veire lo còde font wiki de las paginas protegidas',
10891089 'right-raw' => 'Veire las paginas brutas',
10901090 'right-render' => 'Veire lo rendut de las paginas sens navigacion',
@@ -1267,7 +1267,7 @@
12681268 'grouppermissions-rug-header' => 'Túto stránku môžete použiť na odstránenie používateľov z nepoužívaných (zmazaných) skupín.',
12691269 'grouppermissions-rug-success' => 'Používatelia boli úspešne odstránení z nepoužívaných skupín.',
12701270 'grouppermissions-rug-confirm' => 'Odstrániť používateľov z nepoužívaných skupín',
1271 - 'right-grouppermissions' => 'Správa skupinových oprávnení (špeciálne stránky: [[Special:GroupPermissions|GroupPermissions]] a [[Special:SortPermissions|SortPermissions]])',
 1271+ 'right-grouppermissions' => 'Správa skupinových oprávnení',
12721272 'right-viewsource' => 'Zobraziť zdrojový text chránených stránok',
12731273 'right-raw' => 'Zobraziť nespracované stránky',
12741274 'right-render' => 'Zobraziť vykreslené stránky bez navigácie',
@@ -1337,7 +1337,7 @@
13381338 'grouppermissions-rug-header' => 'Du kan använda denna sida för att ta bort användare från oanvända (raderade) användargrupper.',
13391339 'grouppermissions-rug-success' => 'Användarna har tagits bort från oanvända användargrupper!',
13401340 'grouppermissions-rug-confirm' => 'Ta bort användare från oanvända användargrupper',
1341 - 'right-grouppermissions' => 'Behandla gruppbehörigheter (specialsidor: [[Special:GroupPermissions|gruppbehörigheter]] och [[Special:SortPermissions|sortera behörigheter]])',
 1341+ 'right-grouppermissions' => 'Behandla gruppbehörigheter',
13421342 'right-viewsource' => 'Se skyddade sidors wiki-kod',
13431343 'right-raw' => 'Se sidor i råformat',
13441344 'right-render' => 'Se renderade sidor utan navigation',
Index: trunk/extensions/GroupPermissionsManager/GroupPermissionsManager.php
@@ -15,7 +15,7 @@
1616 'name' => 'GroupPermissions Manager',
1717 'author' => 'Ryan Schmidt',
1818 'url' => 'http://www.mediawiki.org/wiki/Extension:GroupPermissionsManager',
19 - 'version' => '3.2.5',
 19+ 'version' => '3.2.6',
2020 'description' => 'Manage group permissions via a special page',
2121 'descriptionmsg' => 'grouppermissions-desc',
2222 );
Index: trunk/extensions/GroupPermissionsManager/SortPermissions.php
@@ -109,7 +109,8 @@
110110 */
111111 function makeRadios($perm, $types) {
112112 global $wgGPManagerSort;
113 - $ret = "\n<tr id=\"right-$perm\"><td>$perm (<a href=\"javascript:removePerm('$perm');\">".wfMsg('grouppermissions-sp-remove')."</a>)</td>";
 113+ $permmsg = wfEmptyMsg('right-' . $perm, wfMsg('right-' . $perm)) ? $perm : wfMsg('right-' . $perm);
 114+ $ret = "\n<tr id=\"right-$perm\"><td><span title=\"$permmsg\">$perm</span> (<a href=\"javascript:removePerm('$perm');\">".wfMsg('grouppermissions-sp-remove')."</a>)</td>";
114115 foreach($types as $type) {
115116 if(array_key_exists($type, $wgGPManagerSort) && in_array($perm, $wgGPManagerSort[$type])) {
116117 $ret .= "\n<td><input type=\"radio\" name=\"right-$perm\" id=\"$perm-$type\" class=\"type-$type\" value=\"$type\" checked=\"checked\" />";

Status & tagging log