jenkins-bot has submitted this change and it was merged.
Change subject: Follow up I20e46165fb
......................................................................
Follow up I20e46165fb
Use a mediawiki core method to get the desired result, instead of
re-implementing it's functionality in MF.
Change-Id: I261c693944c6b467dd5ba04954dbac64f1bc9075
---
M includes/MobileFrontend.skin.hooks.php
1 file changed, 2 insertions(+), 9 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/MobileFrontend.skin.hooks.php
b/includes/MobileFrontend.skin.hooks.php
index ee9848f..f97c7a7 100644
--- a/includes/MobileFrontend.skin.hooks.php
+++ b/includes/MobileFrontend.skin.hooks.php
@@ -16,17 +16,10 @@
return null;
}
$url = $urlMsg->plain();
- // Support both page titles and URLs
- if ( preg_match( '#^(https?:)?//#', $url ) === 0 ) {
- $title = Title::newFromText( $url );
- if ( !$title ) {
- return null;
- }
- $url = $title->getLocalURL();
- }
+
return Html::element(
'a',
- array( 'href' => $url ),
+ array( 'href' => Skin::makeInternalOrExternalUrl( $url
) ),
$sk->msg( 'mobile-frontend-terms-text' )->text()
);
}
--
To view, visit https://gerrit.wikimedia.org/r/245143
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I261c693944c6b467dd5ba04954dbac64f1bc9075
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits