generating various tokens.
* (bug 30963) Option on Special:Prefixindex and Special:Allpages to not show redirects.
* (bug 18062) new message when edit or create the local page of a shared file
+* (bug 22870) Separate interface message when creating a page
=== Bug fixes in 1.20 ===
* (bug 30245) Use the correct way to construct a log page title.
# Enabled article-related sidebar, toplinks, etc.
$wgOut->setArticleRelated( true );
+ $contextTitle = $this->getContextTitle();
if ( $this->isConflict ) {
- $wgOut->setPageTitle( wfMessage( 'editconflict', $this->getContextTitle()->getPrefixedText() ) );
- } elseif ( $this->section != '' ) {
+ $msg = 'editconflict';
+ } elseif ( $contextTitle->exists() && $this->section != '' ) {
$msg = $this->section == 'new' ? 'editingcomment' : 'editingsection';
- $wgOut->setPageTitle( wfMessage( $msg, $this->getContextTitle()->getPrefixedText() ) );
} else {
- # Use the title defined by DISPLAYTITLE magic word when present
- if ( isset( $this->mParserOutput )
- && ( $dt = $this->mParserOutput->getDisplayTitle() ) !== false ) {
- $title = $dt;
- } else {
- $title = $this->getContextTitle()->getPrefixedText();
- }
- $wgOut->setPageTitle( wfMessage( 'editing', $title ) );
+ $msg = $contextTitle->exists() || ( $contextTitle->getNamespace() == NS_MEDIAWIKI && $contextTitle->getDefaultMessageText() !== false ) ?\r
+ 'editing' : 'creating';\r
+ }
+ # Use the title defined by DISPLAYTITLE magic word when present
+ $displayTitle = isset( $this->mParserOutput ) ? $this->mParserOutput->getDisplayTitle() : false;\r
+ if ( $displayTitle === false ) {\r
+ $displayTitle = $contextTitle->getPrefixedText();\r
}
+ $wgOut->setPageTitle( wfMessage( $msg, $displayTitle ) );
}
/**
This sometimes happens when you are using a buggy web-based anonymous proxy service.",
'edit_form_incomplete' => "'''Some parts of the edit form did not reach the server; double-check that your edits are intact and try again.'''",
'editing' => 'Editing $1',
+'creating' => 'Creating $1',
'editingsection' => 'Editing $1 (section)',
'editingcomment' => 'Editing $1 (new section)',
'editconflict' => 'Edit conflict: $1',
'updated' => '{{Identical|Updated}}',
'previewnote' => 'Note displayed when clicking on Show preview',
'editing' => "Shown as page title when editing a page. \$1 is the name of the page that is being edited. Example: \"''Editing Main Page''\".",
+'creating' => "Shown as page title when creating a page. \$1 is the name of the page that is being created. Example: \"''Creating Main Page''\".",
'editingsection' => 'The variable $1 is the page name. This message displays at the top of the page when a user is editing a page section.',
'explainconflict' => 'Appears at the top of a page when there is an edit conflict.',
'storedversion' => 'This is used in an edit conflict as the label for the top revision that has been stored, as opposed to your version that has not been stored which is shown at the bottom of the page.',
'token_suffix_mismatch',
'edit_form_incomplete',
'editing',
+ 'creating',
'editingsection',
'editingcomment',
'editconflict',