* (bug 6642) Don't offer to unlock the database when it isn't locked
* cleanupTitles.php changed from --dry-run option to --fix, so default
behavior is now a non-invasive check as with namespaceDupes.php
-
+* (bug 6660) Fix behaviour of EditPage::blockedPage() when the article does
+ not exist; now doesn't show the source box if the user hasn't provided it
+ (blocked mid-edit) and the page doesn't exist
== Languages updated ==
# If the user made changes, preserve them when showing the markup
# (This happens when a user is blocked during edit, for instance)
$first = $this->firsttime || ( !$this->save && $this->textbox1 == '' );
- $source = $first ? $this->getContent() : $this->textbox1;
-
+ if( $first ) {
+ $source = $this->mTitle->exists() ? $this->getContent() : false;
+ } else {
+ $source = $this->textbox1;
+ }
+
# Spit out the source or the user's modified version
- $rows = $wgUser->getOption( 'rows' );
- $cols = $wgUser->getOption( 'cols' );
- $attribs = array( 'id' => 'wpTextbox1', 'name' => 'wpTextbox1', 'cols' => $cols, 'rows' => $rows, 'readonly' => 'readonly' );
- $wgOut->addHtml( '<hr />' );
- $wgOut->addWikiText( wfMsg( $first ? 'blockedoriginalsource' : 'blockededitsource', $this->mTitle->getPrefixedText() ) );
- $wgOut->addHtml( wfElement( 'textarea', $attribs, $source ) );
+ if( $source !== false ) {
+ $rows = $wgUser->getOption( 'rows' );
+ $cols = $wgUser->getOption( 'cols' );
+ $attribs = array( 'id' => 'wpTextbox1', 'name' => 'wpTextbox1', 'cols' => $cols, 'rows' => $rows, 'readonly' => 'readonly' );
+ $wgOut->addHtml( '<hr />' );
+ $wgOut->addWikiText( wfMsg( $first ? 'blockedoriginalsource' : 'blockededitsource', $this->mTitle->getPrefixedText() ) );
+ $wgOut->addHtml( wfElement( 'textarea', $attribs, $source ) );
+ }
}
/**