throw new UserBlockedError( $user->getBlock() );
}
+ // Global blocks
+ if ( $user->isBlockedGlobally() ) {
+ throw new UserBlockedError( $user->getGlobalBlock() );
+ }
+
# Check whether we actually want to allow changing stuff
$this->checkReadOnly();
$sessionKey = $this->mUpload->stashSession();
+ // Add styles for the warning, reused from the live preview
+ $this->getOutput()->addModuleStyles( 'mediawiki.special.upload' );
+
$warningHtml = '<h2>' . $this->msg( 'uploadwarning' )->escaped() . "</h2>\n"
- . '<div class="warningbox"><ul>';
+ . '<div class="mw-destfile-warning"><ul>';
foreach ( $warnings as $warning => $args ) {
if ( $warning == 'badfilename' ) {
$this->mDesiredDestName = Title::makeTitle( NS_FILE, $args )->getText();
return false;
} else {
// New page should get watched if that's our option.
- return $this->getUser()->getOption( 'watchcreations' );
+ return $this->getUser()->getOption( 'watchcreations' ) ||
+ $this->getUser()->getOption( 'watchuploads' );
}
}