User "Catrope" changed the status of MediaWiki.r94482.

Old Status: new
New Status: fixme

User "Catrope" also posted a comment on MediaWiki.r94482.

Full URL: 
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/94482#c20906
Commit summary:

Follow-up r92559:
* Use preg_quote() for arrays going to regexes
* Proper escaping for InfoPage->mFormatTitle and status message
* Use wgOut->addModuleStyles() to prevent flash of unstyled content
* Use $wgExtensionAssetsPath to form extension directory
* Remove unneeded isset()s
* Also, prevent php notices in onShowMissingArticle()

Comment:

<pre>
+                               $link = self::getSubdomain( $prefix2['lang'], 
$p,
+                                       ( $title->getNsText() ? 
$title->getNsText() . ':' : '' ) . $prefix2['realtitle'] );
</pre>
Why did you intentionally duplicate this code?

Per Nikerabbit, you should pass '/' as the second param to preg_quote(). You 
can do this in two ways: either create a private static wrapper function that 
returns <code>preg_quote( $foo, '/' )</code>, or use <code>array_map( 
'preg_quote', $arr, array_fill( 0, count( $arr ), '/' ) );</code> .


_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to