Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344986 )

Change subject: Login and logout url should always be relative
......................................................................

Login and logout url should always be relative

Trust core to enforce https.
Login is always on same domain so URL does not need to be an
absolute url.

This dates back to the days where mobile enforced https
and desktop did not. Now that desktop and mobile are consistent
there is no need to need special case this.

Change-Id: I630176f5bb0fdb65b6279253c42f3ebee7bac709
---
M includes/skins/SkinMinerva.php
1 file changed, 3 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/86/344986/1

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 1de9788..bc0e744 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -588,24 +588,12 @@
        }
 
        /**
-        * Prepares a url to the Special:UserLogin with query parameters,
-        * taking into account $wgSecureLogin
+        * Prepares a url to the Special:UserLogin with query parameters
         * @param array $query
         * @return string
         */
        public function getLoginUrl( $query ) {
-               if ( $this->isMobileMode ) {
-                       // FIXME: Does mobile really need special casing here?
-                       $secureLogin = $this->getConfig()->get( 'SecureLogin' );
-
-                       if ( WebRequest::detectProtocol() != 'https' && 
$secureLogin ) {
-                               $loginUrl = SpecialPage::getTitleFor( 
'Userlogin' )->getFullURL( $query );
-                               return $this->mobileContext->getMobileUrl( 
$loginUrl, $secureLogin );
-                       }
-                       return SpecialPage::getTitleFor( 'Userlogin' 
)->getLocalURL( $query );
-               } else {
-                       return SpecialPage::getTitleFor( 'Userlogin' 
)->getFullURL( $query );
-               }
+               return SpecialPage::getTitleFor( 'Userlogin' )->getLocalURL( 
$query );
        }
 
        /**
@@ -632,8 +620,7 @@
                        if ( !empty( $returntoquery ) ) {
                                $query[ 'returntoquery' ] = wfArrayToCgi( 
$returntoquery );
                        }
-                       $url = SpecialPage::getTitleFor( 'Userlogout' 
)->getFullURL( $query );
-                       $url = $this->mobileContext->getMobileUrl( $url, 
$this->getConfig()->get( 'SecureLogin' ) );
+                       $url = SpecialPage::getTitleFor( 'Userlogout' 
)->getLocalURL( $query );
                        $username = $user->getName();
 
                        $menu->insert( 'auth' )

-- 
To view, visit https://gerrit.wikimedia.org/r/344986
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I630176f5bb0fdb65b6279253c42f3ebee7bac709
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to