X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FEditPage.php;h=45995646da592ebfe4253701df816d83f4db1cf1;hb=d1c808c3615e0be250890359da12aabc14b08733;hp=9e278afcf81b811924ba000c142dd35d50989408;hpb=d87022e544995507f0791f0fee77a48d4e182109;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/EditPage.php b/includes/EditPage.php index 9e278afcf8..45995646da 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -689,7 +689,7 @@ class EditPage { # that edit() already checked just in case someone tries to sneak # in the back door with a hand-edited submission URL. - if ( 'save' == $this->formtype ) { + if ( $this->formtype == 'save' ) { $resultDetails = null; $status = $this->attemptSave( $resultDetails ); if ( !$this->handleStatus( $status, $resultDetails ) ) { @@ -699,7 +699,7 @@ class EditPage { # First time through: get contents, set time for conflict # checking, etc. - if ( 'initial' == $this->formtype || $this->firsttime ) { + if ( $this->formtype == 'initial' || $this->firsttime ) { if ( $this->initialiseForm() === false ) { $out = $this->context->getOutput(); if ( $out->getRedirect() === '' ) { // mcrundo hack redirects, don't override it @@ -1969,7 +1969,7 @@ ERROR; return $status; } - if ( $user->isBlockedFrom( $this->mTitle, false ) ) { + if ( $user->isBlockedFrom( $this->mTitle ) ) { // Auto-block user's IP if the account was "hard" blocked if ( !wfReadOnly() ) { $user->spreadAnyEditBlock(); @@ -2611,8 +2611,13 @@ ERROR; if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist $out->wrapWikiMsg( "
\n$1\n
", [ 'userpage-userdoesnotexist', wfEscapeWikiText( $username ) ] ); - } 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( $this->mTitle ) ) + ) { + // 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( $out, 'block', @@ -2858,7 +2863,7 @@ ERROR; // Put these up at the top to ensure they aren't lost on early form submission $this->showFormBeforeText(); - if ( $this->wasDeletedSinceLastEdit() && 'save' == $this->formtype ) { + if ( $this->wasDeletedSinceLastEdit() && $this->formtype == 'save' ) { $username = $this->lastDelete->user_name; $comment = CommentStore::getStore() ->getComment( 'log_comment', $this->lastDelete )->text;