Index: trunk/extensions/CentralAuth/CentralAuth.php |
— | — | @@ -192,6 +192,7 @@ |
193 | 193 | $wgLogActions['globalauth/unlock'] = 'centralauth-log-entry-unlock'; |
194 | 194 | $wgLogActions['globalauth/hide'] = 'centralauth-log-entry-hide'; |
195 | 195 | $wgLogActions['globalauth/unhide'] = 'centralauth-log-entry-unhide'; |
| 196 | +$wgLogActions['globalauth/lockandhide'] = 'centralauth-log-entry-lockandhide'; |
196 | 197 | |
197 | 198 | $wgLogTypes[] = 'gblrights'; |
198 | 199 | $wgLogNames['gblrights'] = 'centralauth-rightslog-name'; |
Index: trunk/extensions/CentralAuth/SpecialCentralAuth.php |
— | — | @@ -131,6 +131,20 @@ |
132 | 132 | $unhidden = true; |
133 | 133 | $this->logAction( 'unhide', $this->mUserName, $wgRequest->getVal( 'reason' ) ); |
134 | 134 | } |
| 135 | + } elseif ( $this->mMethod == 'lockandhide' ) { |
| 136 | + $hStatus = $globalUser->adminHide(); |
| 137 | + if ( !$hStatus->isGood() ) { |
| 138 | + $this->showStatusError( $status->getWikiText() ); |
| 139 | + } |
| 140 | + $lStatus = $globalUser->adminLock(); |
| 141 | + if ( !$lStatus->isGood() ) { |
| 142 | + $this->showStatusError( $status->getWikiText() ); |
| 143 | + } elseif ($hStatus->isGood()) { |
| 144 | + global $wgLang; |
| 145 | + $this->showSuccess( 'centralauth-admin-lockandhide-success', $this->mUserName ); |
| 146 | + $unhidden = true; |
| 147 | + $this->logAction( 'lockandhide', $this->mUserName, $wgRequest->getVal( 'reason' ) ); |
| 148 | + } |
135 | 149 | } else { |
136 | 150 | $this->showError( 'centralauth-admin-bad-input' ); |
137 | 151 | } |
— | — | @@ -151,6 +165,10 @@ |
152 | 166 | if( $globalUser->isHidden() && !$unhidden ) { |
153 | 167 | $this->showActionForm( 'unhide' ); |
154 | 168 | } |
| 169 | + |
| 170 | + if (!$globalUser->isHidden && !$globalUser->isLocked) { |
| 171 | + $this->showActionForm( 'lockandhide' ); |
| 172 | + } |
155 | 173 | } |
156 | 174 | } |
157 | 175 | |
Index: trunk/extensions/CentralAuth/CentralAuth.i18n.php |
— | — | @@ -176,6 +176,12 @@ |
177 | 177 | 'centralauth-admin-unhide-success' => 'Successfully unhid the global account for "<nowiki>$1</nowiki>"', |
178 | 178 | 'centralauth-admin-unhide-nonexistent' => 'Error: the global account "<nowiki>$1</nowiki>" does not exist.', |
179 | 179 | 'centralauth-admin-reason' => 'Reason:', |
| 180 | + 'centralauth-admin-lockandhide-title' => 'Lock and Hide account', |
| 181 | + 'centralauth-admin-lockandhide-description' => 'Locking and hiding this account will prevent it from logging in on any wiki, and hide it from the [[Special:GlobalUsers|list of global users]].', |
| 182 | + 'centralauth-admin-lockandhide-button' => 'Lock and Hide this account', |
| 183 | + 'centralauth-admin-lockandhide-success' => 'Successfully locked and hid the account', |
| 184 | + 'centralauth-admin-lockandhide-nonexistent' => 'Error: the global account "<nowiki>$1</nowiki>" does not exist.', |
| 185 | + |
180 | 186 | |
181 | 187 | // List of global users |
182 | 188 | 'globalusers' => 'Global user list', |
— | — | @@ -223,6 +229,7 @@ |
224 | 230 | 'centralauth-log-entry-unlock' => 'unlocked global account "<nowiki>$1</nowiki>"', |
225 | 231 | 'centralauth-log-entry-hide' => 'hid global account "<nowiki>$1</nowiki>"', |
226 | 232 | 'centralauth-log-entry-unhide' => 'unhid global account "<nowiki>$1</nowiki>"', |
| 233 | + 'centralauth-log-entry-lockandhide' => 'locked and hid global account "<nowiki>$1</nowiki>"', |
227 | 234 | |
228 | 235 | 'centralauth-rightslog-name' => 'Global rights log', |
229 | 236 | 'centralauth-rightslog-entry-usergroups' => 'changed global group membership for $1 from $2 to $3', |