jenkins-bot has submitted this change and it was merged. (
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(-)
Approvals:
Pmiazga: Looks good to me, but someone else must approve
jenkins-bot: Verified
Phuedx: Looks good to me, approved
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index b25e2a0..ffae8d4 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -585,24 +585,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 );
}
/**
@@ -629,8 +617,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: merged
Gerrit-Change-Id: I630176f5bb0fdb65b6279253c42f3ebee7bac709
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: Pmiazga <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits