Index: includes/Article.php =================================================================== --- includes/Article.php (revision 23556) +++ includes/Article.php (working copy) @@ -2723,13 +2723,15 @@ global $wgLang, $wgOut, $wgAllowPageInfo, $wgUser; if ( !$wgAllowPageInfo ) { + echo( "page info seems disabled\n" ); $wgOut->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); return; } $page = $this->mTitle->getSubjectPage(); - $wgOut->setPagetitle( $page->getPrefixedText() ); + $wgOut->setPageTitle( $page->getPrefixedText() ); + $wgOut->setHtmlTitle( wfMsg( 'pagetitle', wfMsg( 'pageinfo', $page->getPrefixedText() ) ) ); $wgOut->setSubtitle( wfMsg( 'infosubtitle' )); # first, see if the page exists at all. Index: includes/EditPage.php =================================================================== --- includes/EditPage.php (revision 23556) +++ includes/EditPage.php (working copy) @@ -1422,7 +1422,9 @@ $wgOut->addParserOutputNoText( $parserOutput ); # ParserOutput might have altered the page title, so reset it - $wgOut->setPageTitle( wfMsg( 'editing', $this->mTitle->getPrefixedText() ) ); + $title = $this->mTitle->getPrefixedText(); + $wgOut->setPageTitle( wfMsg( 'editing', $title ) ); + $wgOut->setHtmlTitle( wfMsg( 'pagetitle', wfMsg( 'previewing', $title ) ) ); foreach ( $parserOutput->getTemplates() as $ns => $template) foreach ( array_keys( $template ) as $dbk) Index: includes/OutputPage.php =================================================================== --- includes/OutputPage.php (revision 23556) +++ includes/OutputPage.php (working copy) @@ -189,44 +189,29 @@ } } - function getPageTitleActionText () { - global $action; - switch($action) { - case 'edit': - case 'delete': - case 'protect': - case 'unprotect': - case 'watch': - case 'unwatch': - // Display title is already customized - return ''; - case 'history': - return wfMsg('history_short'); - case 'submit': - // FIXME: bug 2735; not correct for special pages etc - return wfMsg('preview'); - case 'info': - return wfMsg('info_short'); - default: - return ''; - } - } - public function setRobotpolicy( $str ) { $this->mRobotpolicy = $str; } - public function setHTMLTitle( $name ) {$this->mHTMLtitle = $name; } - public function setPageTitle( $name ) { - global $action, $wgContLang; - $name = $wgContLang->convert($name, true); - $this->mPagetitle = $name; - if(!empty($action)) { - $taction = $this->getPageTitleActionText(); - if( !empty( $taction ) ) { - $name .= ' - '.$taction; - } - } - - $this->setHTMLTitle( wfMsg( 'pagetitle', $name ) ); + + /** + * Set the full page title as used in the element + * + * @param string $text Title text + */ + public function setHtmlTitle( $text ) { + $this->mHTMLtitle = $text; } + + /** + * Set the page title + * + * @param string $text Title text + */ + public function setPageTitle( $text ) { + global $wgContLang; + $text = $wgContLang->convert( $text, true ); + $this->mPagetitle = $text; + $this->setHtmlTitle( wfMsg( 'pagetitle', $text ) ); + } + public function getHTMLTitle() { return $this->mHTMLtitle; } public function getPageTitle() { return $this->mPagetitle; } public function setSubtitle( $str ) { $this->mSubtitle = /*$this->parse(*/$str/*)*/; } // @bug 2514 Index: includes/PageHistory.php =================================================================== --- includes/PageHistory.php (revision 23556) +++ includes/PageHistory.php (working copy) @@ -62,6 +62,7 @@ * Setup page variables. */ $wgOut->setPageTitle( $this->mTitle->getPrefixedText() ); + $wgOut->setHtmlTitle( wfMsg( 'pagetitle', wfMsg( 'pagehistory', $this->mTitle->getPrefixedText() ) ) ); $wgOut->setArticleFlag( false ); $wgOut->setArticleRelated( true ); $wgOut->setRobotpolicy( 'noindex,nofollow' ); Index: languages/messages/MessagesEn.php =================================================================== --- languages/messages/MessagesEn.php (revision 23556) +++ languages/messages/MessagesEn.php (working copy) @@ -603,8 +603,10 @@ 'searcharticle' => 'Go', 'history' => 'Page history', 'history_short' => 'History', +'pagehistory' => '$1 - History', 'updatedmarker' => 'updated since my last visit', 'info_short' => 'Information', +'pageinfo' => '$1 - Information', 'printableversion' => 'Printable version', 'permalink' => 'Permanent link', 'print' => 'Print', @@ -997,6 +999,7 @@ <strong>If this is a legitimate edit attempt, please try again. If it still doesn't work, try logging out and logging back in.</strong>", 'importing' => 'Importing $1', 'editing' => 'Editing $1', +'previewing' => 'Editing $1 - Preview', 'editinguser' => 'Editing user <b>$1</b>', 'editingsection' => 'Editing $1 (section)', 'editingcomment' => 'Editing $1 (comment)',