From 34e61b199ec91d1e22b829b1690ecc47fb8cacb5 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 14 Sep 2007 20:53:19 +0000 Subject: [PATCH] * (bug 11342) Fix several 'returnto' links in permissions/error pages which linked to the main page instead of targetted page --- RELEASE-NOTES | 3 +++ includes/Article.php | 2 +- includes/EditPage.php | 8 ++++---- includes/OutputPage.php | 2 +- includes/SpecialUserlogin.php | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e2133b061a..9f4cb706c2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -54,6 +54,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 11321) Fix width of gallerybox when option "width=xxx" is used * (bug 7890) Special:BrokenRedirects links deleted redirects to a non-existent page * Fix initial statistics when installing: add correct values +* (bug 11342) Fix several 'returnto' links in permissions/error pages which + linked to the main page instead of targetted page + === API changes in 1.12 === diff --git a/includes/Article.php b/includes/Article.php index f83b17bb91..756a763faf 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2025,7 +2025,7 @@ class Article { \n" ); - $wgOut->returnToMain( false ); + $wgOut->returnToMain( false, $this->mTitle ); $this->showLogExtract( $wgOut ); } diff --git a/includes/EditPage.php b/includes/EditPage.php index e878617968..2d9ef982c6 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1494,7 +1494,7 @@ END $wgOut->setArticleRelated( false ); $wgOut->addHtml( wfMsgWikiHtml( 'whitelistedittext', $loginLink ) ); - $wgOut->returnToMain( false, $this->mTitle->getPrefixedUrl() ); + $wgOut->returnToMain( false, $this->mTitle ); } /** @@ -1510,7 +1510,7 @@ END $wgOut->setArticleRelated( false ); $wgOut->addWikiText( wfMsg( 'confirmedittext' ) ); - $wgOut->returnToMain( false ); + $wgOut->returnToMain( false, $this->mTitle ); } /** @@ -1525,7 +1525,7 @@ END $wgOut->setArticleRelated( false ); $wgOut->addWikiText( wfMsg( 'nosuchsectiontext', $this->section ) ); - $wgOut->returnToMain( false, $this->mTitle->getPrefixedUrl() ); + $wgOut->returnToMain( false, $this->mTitle ); } /** @@ -1544,7 +1544,7 @@ END if ( $match ) $wgOut->addWikiText( wfMsg( 'spamprotectionmatch', "{$match}" ) ); - $wgOut->returnToMain( false ); + $wgOut->returnToMain( false, $this->mTitle ); } /** diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 3f69fab6c0..60cf395204 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1060,7 +1060,7 @@ class OutputPage { $article = new Article( $wgTitle ); $this->addHTML( $skin->formatTemplates( $article->getUsedTemplates() ) ); - $this->returnToMain( false ); + $this->returnToMain( false, $wgTitle ); } /** @deprecated */ diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index 70619d5a55..1568ea4d89 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -189,7 +189,7 @@ class LoginForm { $wgOut->setArticleRelated( false ); $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->addHtml( wfMsgWikiHtml( 'accountcreatedtext', $u->getName() ) ); - $wgOut->returnToMain( $self->getPrefixedText() ); + $wgOut->returnToMain( false, $self ); wfRunHooks( 'AddNewAccount', array( $u ) ); return true; } -- 2.20.1