Wikia code/includes/specials/SpecialUserrights.php
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. The information shown below refers to the now unmaintained 1.16 MediaWiki release. The current stable release number is 1.43.0. |
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\specials\SpecialUserrights.php 2011-07-18 22:31:17.630859400 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\specials\SpecialUserrights.php 2011-08-17 15:28:16.272460900 +0100
@@ -89,6 +89,13 @@
return;
}
+ // check if user is blocked -- see rt#19111
+ if ( $wgUser->isBlocked() ) {
+ global $wgOut;
+ $wgOut->blockedPage();
+ return;
+ }
+
if ( wfReadOnly() ) {
$wgOut->readOnlyPage();
return;
@@ -395,6 +402,12 @@
protected function showEditUserGroupsForm( $user, $groups ) {
global $wgOut, $wgUser, $wgLang;
+ /* Wikia change begin - @author: Marooned */
+ /* This hook was invalid in this version of the code and in the current (2010-05-18) MW trunk it even doesn't exist */
+ /* We need it to alter displayed list without alter real groups */
+ wfRunHooks('UserRights::showEditUserGroupsForm', array( &$user, &$groups ));
+ /* Wikia change end */
+
$list = array();
foreach( $groups as $group )
$list[] = self::buildGroupLink( $group );
@@ -492,6 +505,11 @@
( $set && !$this->canAdd( $group ) ) ||
( !$set && !$this->canRemove( $group ) ) );
+ /* Wikia change begin - @author: Marooned */
+ /* Because of "return all" in changeableGroups() hook UserrightsChangeableGroups is not invoked - this hook is to fill this gap */
+ wfRunHooks('UserRights::groupCheckboxes', array( $group, &$disabled, &$irreversible ));
+ /* Wikia change end */
+
$checkbox = array(
'set' => $set,
'disabled' => $disabled,