r112619 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112618‎ | r112619 | r112620 >
Date:17:49, 28 February 2012
Author:awjrichards
Status:ok
Tags:
Comment:
Removing any invocation of MobileFrontend::updateMobileUrlPath() for now but leaving functionality in place for when we're ready to implement.
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.body.php (modified) (history)
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.body.php
@@ -1271,7 +1271,6 @@
12721272 public function getMobileUrl( $url, $forceHttps = false ) {
12731273 $parsedUrl = wfParseUrl( $url );
12741274 $this->updateMobileUrlHost( $parsedUrl );
1275 - $this->updateMobileUrlPath( $parsedUrl );
12761275 if ( $forceHttps ) {
12771276 $parsedUrl[ 'scheme' ] = 'https';
12781277 }
@@ -1311,6 +1310,12 @@
13121311
13131312 /**
13141313 * Update path of given URL to conform to mobile URL template.
 1314+ *
 1315+ * NB: this is not actually being used anywhere at the moment. It will
 1316+ * take some magic to get MW to properly handle path modifications like
 1317+ * this is intended to provide. This will hopefully be implemented someday
 1318+ * in the not to distant future.
 1319+ *
13151320 * @param $parsedUrl array
13161321 * Result of parseUrl() or wfParseUrl()
13171322 */
Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -83,8 +83,8 @@
8484 * This will be used to transcode regular URLs into mobile URLs for the
8585 * mobile view.
8686 *
87 - * It's possible to specify the 'mobileness' of the URL either in the
88 - * host portion, or in the path portion.
 87+ * It's possible to specify the 'mobileness' of the URL in the host portion of
 88+ * the URL.
8989 *
9090 * You can either statically or dynamically create the host-portion of your
9191 * mobile URL. To statically create it, just set $wgMobileUrlTemplate to
@@ -99,14 +99,6 @@
100100 * So, if you wanted a mobile URL scheme that turned "en.wikipedia.org" into
101101 * "en.m.wikipedia.org", your URL template would look like:
102102 * %h0.m.%h1.%h2
103 - *
104 - * If you prefer to use template the path, be sure to exclude $wgScriptPath.
105 - * You can specify where the non-mobile path portion appears with the token %p.
106 - * For instance:
107 - * $wgMobileUrlTemplate = "/mobile/%p";
108 - *
109 - * At the moment, this might behave strangely if you want to template both the
110 - * host and path portions of the URL.
111103 */
112104 $wgMobileUrlTemplate = '%h0.m.%h1.%h2';
113105

Status & tagging log