Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -523,7 +523,7 @@ |
524 | 524 | } elseif ( $this->section == 'new' ) { |
525 | 525 | // Nothing *to* preview for new sections |
526 | 526 | return false; |
527 | | - } elseif ( ( $wgRequest->getVal( 'preload' ) !== '' || $this->mTitle->exists() ) && $wgUser->getOption( 'previewonfirst' ) ) { |
| 527 | + } elseif ( ( $wgRequest->getVal( 'preload' ) !== null || $this->mTitle->exists() ) && $wgUser->getOption( 'previewonfirst' ) ) { |
528 | 528 | // Standard preference behaviour |
529 | 529 | return true; |
530 | 530 | } elseif ( !$this->mTitle->exists() && $this->mTitle->getNamespace() == NS_CATEGORY ) { |
— | — | @@ -678,8 +678,16 @@ |
679 | 679 | if ( $this->suppressIntro ) { |
680 | 680 | return; |
681 | 681 | } |
| 682 | + |
| 683 | + $namespace = $this->mTitle->getNamespace(); |
| 684 | + |
| 685 | + if ( $namespace == NS_MEDIAWIKI ) { |
| 686 | + # Show a warning if editing an interface message |
| 687 | + $wgOut->wrapWikiMsg( "<div class='mw-editinginterface'>\n$1</div>", 'editinginterface' ); |
| 688 | + } |
| 689 | + |
682 | 690 | # Show a warning message when someone creates/edits a user (talk) page but the user does not exists |
683 | | - if ( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) { |
| 691 | + if ( $namespace == NS_USER || $namespace == NS_USER_TALK ) { |
684 | 692 | $parts = explode( '/', $this->mTitle->getText(), 2 ); |
685 | 693 | $username = $parts[0]; |
686 | 694 | $id = User::idFromName( $username ); |
— | — | @@ -1161,7 +1169,7 @@ |
1162 | 1170 | } |
1163 | 1171 | |
1164 | 1172 | if ( $this->missingComment ) { |
1165 | | - $wgOut->wrapWikiMsg( '<div id="mw-missingcommenttext">$1</div>', 'missingcommenttext' ); |
| 1173 | + $wgOut->wrapWikiMsg( '<div id="mw-missingcommenttext">$1</div>', 'missingcommenttext' ); |
1166 | 1174 | } |
1167 | 1175 | |
1168 | 1176 | if ( $this->missingSummary && $this->section != 'new' ) { |
— | — | @@ -1214,8 +1222,6 @@ |
1215 | 1223 | |
1216 | 1224 | $classes = array(); // Textarea CSS |
1217 | 1225 | if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { |
1218 | | - # Show a warning if editing an interface message |
1219 | | - $wgOut->wrapWikiMsg( "<div class='mw-editinginterface'>\n$1</div>", 'editinginterface' ); |
1220 | 1226 | } elseif ( $this->mTitle->isProtected( 'edit' ) ) { |
1221 | 1227 | # Is the title semi-protected? |
1222 | 1228 | if ( $this->mTitle->isSemiProtected() ) { |