dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
53f5c13
)
Modify maintenance/dev/ router code to fix the bug where post data gets discarded...
author
Daniel Friesen
<dantman@users.mediawiki.org>
Thu, 24 Nov 2011 08:41:57 +0000
(08:41 +0000)
committer
Daniel Friesen
<dantman@users.mediawiki.org>
Thu, 24 Nov 2011 08:41:57 +0000
(08:41 +0000)
maintenance/dev/router.php
patch
|
blob
|
history
diff --git
a/maintenance/dev/router.php
b/maintenance/dev/router.php
index
a35e217
..
ca5c410
100644
(file)
--- a/
maintenance/dev/router.php
+++ b/
maintenance/dev/router.php
@@
-1,5
+1,8
@@
<?php
<?php
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
if ( isset( $_SERVER["SCRIPT_FILENAME"] ) ) {
$file = $_SERVER["SCRIPT_FILENAME"];
if ( !is_readable( $file ) ) {
if ( isset( $_SERVER["SCRIPT_FILENAME"] ) ) {
$file = $_SERVER["SCRIPT_FILENAME"];
if ( !is_readable( $file ) ) {
@@
-7,9
+10,13
@@
if ( isset( $_SERVER["SCRIPT_FILENAME"] ) ) {
return false;
}
$ext = pathinfo( $file, PATHINFO_EXTENSION );
return false;
}
$ext = pathinfo( $file, PATHINFO_EXTENSION );
- if ( $ext == 'php' ) {
- # Let it execute php files
- return false;
+ if ( $ext == 'php' || $ext == 'php5' ) {
+ # Execute php files
+ # 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;
+ return true;
}
$mime = false;
$lines = explode( "\n", file_get_contents( "includes/mime.types" ) );
}
$mime = false;
$lines = explode( "\n", file_get_contents( "includes/mime.types" ) );