* (bug 8136) Introduce 'ArticleUndelete' hook; see docs/hooks.txt for more info
* (bug 8688) Handle underscores/spaces in Special:Blockip and Special:Ipblocklist
in a consistent manner
+* (bug 8701) Check database lock status when blocking/unblocking users
== Languages updated ==
function wfSpecialBlockip( $par ) {
global $wgUser, $wgOut, $wgRequest;
+ # Can't block when the database is locked
+ if( wfReadOnly() ) {
+ $wgOut->readOnlyPage();
+ return;
+ }
+
+ # Permission check
if( !$wgUser->isAllowed( 'block' ) ) {
$wgOut->permissionRequired( 'block' );
return;
*/
function wfSpecialIpblocklist() {
global $wgUser, $wgOut, $wgRequest;
-
+
$ip = $wgRequest->getVal( 'wpUnblockAddress', $wgRequest->getVal( 'ip' ) );
$id = $wgRequest->getVal( 'id' );
$reason = $wgRequest->getText( 'wpUnblockReason' );
$wgOut->permissionRequired( 'block' );
return;
}
+ # Can't unblock when the database is locked
+ if( wfReadOnly() ) {
+ $wgOut->readOnlyPage();
+ return;
+ }
$ipu->doSubmit();
} else if ( "unblock" == $action ) {
+ # Can't unblock when the database is locked
+ if( wfReadOnly() ) {
+ $wgOut->readOnlyPage();
+ return;
+ }
$ipu->showForm( "" );
} else {
$ipu->showList( "" );