Merge "ImageListPager: Kill that annoying GROUP BY"
[lhc/web/wiklou.git] / includes / page / Article.php
index 9f7f280..9b5e5a5 100644 (file)
@@ -295,7 +295,7 @@ class Article implements Page {
                        $content = ContentHandler::makeContent( $text, $this->getTitle() );
                } else {
                        $message = $this->getContext()->getUser()->isLoggedIn() ? 'noarticletext' : 'noarticletextanon';
-                       $content = new MessageContent( $message, null, 'parsemag' );
+                       $content = new MessageContent( $message, null );
                }
 
                return $content;
@@ -1367,8 +1367,13 @@ class Article implements Page {
                        if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist
                                $outputPage->wrapWikiMsg( "<div class=\"mw-userpage-userdoesnotexist error\">\n\$1\n</div>",
                                        [ 'userpage-userdoesnotexist-view', wfEscapeWikiText( $rootPart ) ] );
-                       } elseif ( !is_null( $block ) && $block->getType() != Block::TYPE_AUTO ) {
-                               # Show log extract if the user is currently blocked
+                       } elseif (
+                               !is_null( $block ) &&
+                               $block->getType() != Block::TYPE_AUTO &&
+                               ( $block->isSitewide() || $user->isBlockedFrom( $title ) )
+                       ) {
+                               // Show log extract if the user is sitewide blocked or is partially
+                               // blocked and not allowed to edit their user page or user talk page
                                LogEventsList::showLogExtract(
                                        $outputPage,
                                        'block',