Follow-up to r54556: fix login/logout links in core
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 17 Aug 2009 20:28:24 +0000 (20:28 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 17 Aug 2009 20:28:24 +0000 (20:28 +0000)
includes/SkinTemplate.php

index c91c580..cb260ef 100644 (file)
@@ -162,10 +162,13 @@ class SkinTemplate extends Skin {
                wfProfileIn( __METHOD__ . '-stuff' );
                $this->thispage = $this->mTitle->getPrefixedDBkey();
                $this->thisurl = $this->mTitle->getPrefixedURL();
-               $query = $wgRequest->getValues();
-               unset( $query['title'] );
-               unset( $query['returnto'] );
-               unset( $query['returntoquery'] );
+               $query = array();
+               if ( !$wgRequest->wasPosted() ) {
+                       $query = $wgRequest->getValues();
+                       unset( $query['title'] );
+                       unset( $query['returnto'] );
+                       unset( $query['returntoquery'] );
+               }
                $this->thisquery = wfUrlencode( wfArrayToCGI( $query ) );
                $this->loggedin = $wgUser->isLoggedIn();
                $this->iscontent = ( $this->mTitle->getNamespace() != NS_SPECIAL );