r50866 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50865‎ | r50866 | r50867 >
Date:18:45, 21 May 2009
Author:siebrand
Status:deferred
Tags:
Comment:
Rename user right from 'userrights-global' to 'userrights-shared' to resolve conflict with extension GlobalUserrights
Modified paths:
  • /trunk/extensions/SharedUserRights/SharedUserRights.i18n.php (modified) (history)
  • /trunk/extensions/SharedUserRights/SharedUserRights.php (modified) (history)
  • /trunk/extensions/SharedUserRights/SharedUserRights_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SharedUserRights/SharedUserRights_body.php
@@ -26,7 +26,7 @@
2727 }
2828
2929 public function userCanExecute( $user ) {
30 - return $user->isAllowed( 'userrights-global' );
 30+ return $user->isAllowed( 'userrights-shared' );
3131 }
3232
3333 /**
@@ -49,7 +49,7 @@
5050 # This might be redundant, but more security is always good. Right?
5151 if ( !$this->userCanExecute( $wgUser ) ) {
5252 global $wgOut;
53 - $wgOut->permissionRequired( 'userrights-global' );
 53+ $wgOut->permissionRequired( 'userrights-shared' );
5454 return;
5555 }
5656
Index: trunk/extensions/SharedUserRights/SharedUserRights.i18n.php
@@ -18,7 +18,7 @@
1919 'gblrights-logpage' => 'Global Rights Log',
2020 'gblrights-pagetext' => 'This is a log of all the changes that are made to the wiki family\'s global rights table',
2121 'gblrights-rights-entry' => 'changed global group membership for $1 from $2 to $3',
22 - 'right-userrights-global' => 'Manage shared user rights',
 22+ 'right-userrights-shared' => 'Manage shared user rights',
2323 );
2424
2525 /** Message documentation (Message documentation)
Index: trunk/extensions/SharedUserRights/SharedUserRights.php
@@ -6,7 +6,7 @@
77 *
88 * @author Łukasz 'TOR' Garczewski <tor@wikia-inc.com>
99 * @author Charles Melbye <charlie@yourwiki.net>
10 -* @version 0.11
 10+* @version 0.12
1111 * @copyright Copyright © 2008 Łukasz 'TOR' Garczewski, Wikia, Inc.
1212 * @copyright Copyright (C) 2008 YourWiki, Inc.
1313 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
@@ -23,7 +23,7 @@
2424 'path' => __FILE__,
2525 'name' => 'SharedUserRights',
2626 'url' => 'http://www.mediawiki.org/wiki/Extension:SharedUserRights',
27 - 'version' => '0.11',
 27+ 'version' => '0.12',
2828 'author' => array( "Łukasz 'TOR' Garczewski", 'Charles Melbye' ),
2929 'description' => 'Easy global user rights administration',
3030 'descriptionmsg' => 'gblrights-desc',
@@ -31,7 +31,7 @@
3232
3333 $dir = dirname( __FILE__ ) . '/';
3434
35 -$wgAvailableRights[] = 'userrights-global';
 35+$wgAvailableRights[] = 'userrights-shared';
3636 $wgAutoloadClasses['SharedUserRights'] = $dir . 'SharedUserRights_body.php';
3737 $wgExtensionMessagesFiles['SharedUserRights'] = $dir . 'SharedUserRights.i18n.php';
3838 $wgExtensionAliasesFiles['SharedUserRights'] = $dir . 'SharedUserRights.alias.php';
@@ -43,7 +43,6 @@
4444 $wgLogHeaders['gblrights'] = 'gblrights-pagetext';
4545 $wgLogActions['gblrights/rights'] = 'gblrights-rights-entry';
4646
47 -
4847 // Hooked functions
4948 $wgHooks['UserEffectiveGroups'][] = 'efAddSharedUserRights';
5049
@@ -73,11 +72,11 @@
7473 */
7574 function efSharedTable( $table )
7675 {
77 - global $wgSharedDB;
 76+ global $wgSharedDB;
7877
79 - if ( !empty( $wgSharedDB ) ) {
80 - return "`$wgSharedDB`.`$table`";
81 - } else {
82 - return "`$table`";
83 - }
 78+ if ( !empty( $wgSharedDB ) ) {
 79+ return "`$wgSharedDB`.`$table`";
 80+ } else {
 81+ return "`$table`";
 82+ }
8483 }

Status & tagging log