* (bug 11342) Fix several 'returnto' links in permissions/error pages which
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 14 Sep 2007 20:53:19 +0000 (20:53 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 14 Sep 2007 20:53:19 +0000 (20:53 +0000)
  linked to the main page instead of targetted page

RELEASE-NOTES
includes/Article.php
includes/EditPage.php
includes/OutputPage.php
includes/SpecialUserlogin.php

index e2133b0..9f4cb70 100644 (file)
@@ -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 ===
 
index f83b17b..756a763 100644 (file)
@@ -2025,7 +2025,7 @@ class Article {
        <input type='hidden' name='wpEditToken' value=\"{$token}\" />
 </form>\n" );
 
-               $wgOut->returnToMain( false );
+               $wgOut->returnToMain( false, $this->mTitle );
 
                $this->showLogExtract( $wgOut );
        }
index e878617..2d9ef98 100644 (file)
@@ -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', "<nowiki>{$match}</nowiki>" ) );
 
-               $wgOut->returnToMain( false );
+               $wgOut->returnToMain( false, $this->mTitle );
        }
 
        /**
index 3f69fab..60cf395 100644 (file)
@@ -1060,7 +1060,7 @@ class OutputPage {
                $article = new Article( $wgTitle );
                $this->addHTML( $skin->formatTemplates( $article->getUsedTemplates() ) );
 
-               $this->returnToMain( false );
+               $this->returnToMain( false, $wgTitle );
        }
 
        /** @deprecated */
index 70619d5..1568ea4 100644 (file)
@@ -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;
                }