r111566 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111565‎ | r111566 | r111567 >
Date:19:33, 15 February 2012
Author:dantman
Status:ok (Comments)
Tags:
Comment:
Add missing delimiters to the regexp in maintenace/dev/'s router.
Modified paths:
  • /trunk/phase3/maintenance/dev/includes/router.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dev/includes/router.php
@@ -62,7 +62,7 @@
6363 # PHP webserver doesn't understand.
6464 # ;) Nicely enough we just happen to bundle a mime.types file
6565 $f = fopen($file, 'rb');
66 - if ( preg_match( '^text/', $mime ) ) {
 66+ if ( preg_match( '#^text/#', $mime ) ) {
6767 # Text should have a charset=UTF-8 (php's webserver does this too)
6868 header("Content-Type: $mime; charset=UTF-8");
6969 } else {

Comments

#Comment by Hashar (talk | contribs)   16:42, 17 February 2012

by convention we use either slash or %. Change is fine nonetheless.

#Comment by Aaron Schulz (talk | contribs)   18:59, 17 February 2012

I've seen '#' and '!'

Status & tagging log