Last modified: 2014-02-12 23:53:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32142, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30142 - Don't manually build URLs in MobileFrontend extension
Don't manually build URLs in MobileFrontend extension
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 30512
  Show dependency treegraph
 
Reported: 2011-07-31 00:00 UTC by Sam Reed (reedy)
Modified: 2014-02-12 23:53 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2011-07-31 00:00:25 UTC
MW has wrapper functions for querystring building etc

It saves having to do stuff like

$delimiter = ( strpos( $mobileViewUrl, "?" ) !== false ) ? "&" : "?";

And also makes sure that all parameters are properly encoded

As per a request on #wikimedia-tech where this was giving validation errors

<li id="mobileview"><a href='/w/index.php?title=Datei%3ALogo_African_Pygmy_Goat.png&action=edit&useFormat=mobile'>Mobile View</a></li>

r93561
Comment 1 Sam Reed (reedy) 2011-07-31 00:01:29 UTC
		$mobileViewUrl = $wgRequest->getRequestURL();
		$delimiter = ( strpos( $mobileViewUrl, "?" ) !== false ) ? "&" : "?";
		$mobileViewUrl .= $delimiter . 'useFormat=mobile';
		$mobileViewUrl = htmlspecialchars( $mobileViewUrl );


even
Comment 2 Derk-Jan Hartman 2011-08-01 16:43:36 UTC
That particular case is already fixed in r93591. But there a few more problems around.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links