X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=blobdiff_plain;f=includes%2Fuser%2FUser.php;h=5f772a4531276f2828736689344b312eb46e1810;hb=1db4c42f46b538b45aff231989ab495b317aceda;hp=f429ab510c4ed433eccc384f8ac92eeb5bcdb88e;hpb=d7066ad8c251ea610c3cbd8be57f22b9b2fe0a85;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/user/User.php b/includes/user/User.php index f429ab510c..5f772a4531 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -2304,7 +2304,18 @@ class User implements IDBAccessObject, UserIdentity { if ( !$blocked ) { $block = $this->getBlock( $fromReplica ); if ( $block ) { - $blocked = $block->preventsEdit( $title ); + // A sitewide block covers everything except maybe the user's + // talk page. A partial block covering the user's talk page + // overrides the editownusertalk flag, however. + // TODO: Do we really want a partial block on the user talk + // namespace to ignore editownusertalk? + $blocked = $block->isSitewide(); + if ( $blocked && $title->equals( $this->getTalkPage() ) ) { + $blocked = $block->prevents( 'editownusertalk' ); + } + if ( !$block->isSitewide() ) { + $blocked = $block->appliesToTitle( $title ); + } } }