Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/245143
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/43/245143/1
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: newchange
Gerrit-Change-Id: I261c693944c6b467dd5ba04954dbac64f1bc9075
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits