Last modified: 2014-02-12 23:53:29 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
$mobileViewUrl = $wgRequest->getRequestURL(); $delimiter = ( strpos( $mobileViewUrl, "?" ) !== false ) ? "&" : "?"; $mobileViewUrl .= $delimiter . 'useFormat=mobile'; $mobileViewUrl = htmlspecialchars( $mobileViewUrl ); even
That particular case is already fixed in r93591. But there a few more problems around.