$wgSysopRangeBans = true; # Allow sysops to ban IP ranges
$wgAutoblockExpiry = 86400; # Number of seconds before autoblock entries expire
+$wgBlockAllowsUTEdit = false; # Blocks allow users to edit their own user talk page
/**
* Permission keys given to users in each group.
$wgOut->readOnlyPage( $this->mArticle->getContent( true ), true );
return;
}
- if ( !$this->preview && !$this->diff && $wgUser->isBlocked( !$this->save ) ) {
+ if ( !$this->preview && !$this->diff && $wgUser->isBlockedFrom( $this->mTitle, !$this->save ) ) {
# When previewing, don't check blocked state - will get caught at save time.
# Also, check when starting edition is done against slave to improve performance.
$this->blockedIPpage();
# Error messages or other handling should be performed by the filter function
return;
}
- if ( $wgUser->isBlocked( false ) ) {
+ if ( $wgUser->isBlockedFrom( $this->mTitle, false ) ) {
# Check block state against master, thus 'false'.
$this->blockedIPpage();
return;
$this->getBlockedStatus( $bFromSlave );
return $this->mBlockedby !== 0;
}
+
+ /**
+ * Check if user is blocked from editing a particular article
+ */
+ function isBlockedFrom( $title, $bFromSlave = false ) {
+ global $wgBlockAllowsUTEdit;
+ if ( $wgBlockAllowsUTEdit && $title->getText() === $this->getName() &&
+ $title->getNamespace() == NS_USER_TALK )
+ {
+ return false;
+ } else {
+ return $this->isBlocked( $bFromSlave );
+ }
+ }
/**
* Get name of blocker