use MediaWiki\EditPage\TextboxBuilder;
use MediaWiki\EditPage\TextConflictHelper;
use MediaWiki\Logger\LoggerFactory;
use MediaWiki\EditPage\TextboxBuilder;
use MediaWiki\EditPage\TextConflictHelper;
use MediaWiki\Logger\LoggerFactory;
/**
* This is the function that gets called for "action=edit". It
* sets up various member variables, then passes execution to
/**
* This is the function that gets called for "action=edit". It
* sets up various member variables, then passes execution to
if ( $this->context->getUser()->getBlock() ) {
// track block with a cookie if it doesn't exists already
if ( $this->context->getUser()->getBlock() ) {
// track block with a cookie if it doesn't exists already
if ( $file && !$file->isLocal() ) {
$descUrl = $file->getDescriptionUrl();
# there must be a description url to show a hint to shared repo
if ( $file && !$file->isLocal() ) {
$descUrl = $file->getDescriptionUrl();
# there must be a description url to show a hint to shared repo
$username = explode( '/', $this->mTitle->getText(), 2 )[0];
$user = User::newFromName( $username, false /* allow IP users */ );
$ip = User::isIP( $username );
$username = explode( '/', $this->mTitle->getText(), 2 )[0];
$user = User::newFromName( $username, false /* allow IP users */ );
$ip = User::isIP( $username );
if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist
$out->wrapWikiMsg( "<div class=\"mw-userpage-userdoesnotexist error\">\n$1\n</div>",
[ 'userpage-userdoesnotexist', wfEscapeWikiText( $username ) ] );
} elseif (
!is_null( $block ) &&
if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist
$out->wrapWikiMsg( "<div class=\"mw-userpage-userdoesnotexist error\">\n$1\n</div>",
[ 'userpage-userdoesnotexist', wfEscapeWikiText( $username ) ] );
} elseif (
!is_null( $block ) &&
( $block->isSitewide() || $user->isBlockedFrom( $this->mTitle ) )
) {
// Show log extract if the user is sitewide blocked or is partially
( $block->isSitewide() || $user->isBlockedFrom( $this->mTitle ) )
) {
// Show log extract if the user is sitewide blocked or is partially
// Don't add a pointless `<div>` to the page unless a hook caller populated it
return ( $toolbar === $startingToolbar ) ? null : $toolbar;
}
// Don't add a pointless `<div>` to the page unless a hook caller populated it
return ( $toolbar === $startingToolbar ) ? null : $toolbar;
}