summaryrefslogtreecommitdiff
path: root/maintenance/dev/includes/router.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/dev/includes/router.php')
-rw-r--r--maintenance/dev/includes/router.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/maintenance/dev/includes/router.php b/maintenance/dev/includes/router.php
index 1d5070b1..a3cc0ba3 100644
--- a/maintenance/dev/includes/router.php
+++ b/maintenance/dev/includes/router.php
@@ -25,8 +25,8 @@ if ( PHP_SAPI != 'cli-server' ) {
die( "This script can only be run by php's cli-server sapi." );
}
-ini_set('display_errors', 1);
-error_reporting(E_ALL);
+ini_set( 'display_errors', 1 );
+error_reporting( E_ALL );
if ( isset( $_SERVER["SCRIPT_FILENAME"] ) ) {
# Known resource, sometimes a script sometimes a file
@@ -58,7 +58,7 @@ if ( $ext == 'php' || $ext == 'php5' ) {
# We use require and return true here because when you return false
# the php webserver will discard post data and things like login
# will not function in the dev environment.
- require( $file );
+ require $file;
return true;
}
$mime = false;
@@ -83,16 +83,16 @@ if ( $mime ) {
# This way we can serve things like .svg files that the built-in
# PHP webserver doesn't understand.
# ;) Nicely enough we just happen to bundle a mime.types file
- $f = fopen($file, 'rb');
+ $f = fopen( $file, 'rb' );
if ( preg_match( '#^text/#', $mime ) ) {
# Text should have a charset=UTF-8 (php's webserver does this too)
- header("Content-Type: $mime; charset=UTF-8");
+ header( "Content-Type: $mime; charset=UTF-8" );
} else {
- header("Content-Type: $mime");
+ header( "Content-Type: $mime" );
}
- header("Content-Length: " . filesize($file));
+ header( "Content-Length: " . filesize( $file ) );
// Stream that out to the browser
- fpassthru($f);
+ fpassthru( $f );
return true;
}