X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=index.php;h=bc527799cb0f7cce6f7384ae266ed0813c0d3bd8;hb=65ddb10966a25c5f7e49eff5fbc1de291e9ee9ef;hp=f22de25ff098f5fb5e6fb555138b6f492f3623ec;hpb=84f1376565293de120c4a88316cbf5e63a70fdea;p=lhc%2Fweb%2Fwiklou.git diff --git a/index.php b/index.php index f22de25ff0..bc527799cb 100644 --- a/index.php +++ b/index.php @@ -3,35 +3,50 @@ * Main wiki script; see docs/design.txt * @package MediaWiki */ - $wgRequestTime = microtime(); +# getrusage() does not exist on the Microsoft Windows platforms, catching this +if ( function_exists ( 'getrusage' ) ) { + $wgRUstart = getrusage(); +} else { + $wgRUstart = array(); +} + unset( $IP ); @ini_set( 'allow_url_fopen', 0 ); # For security... +if ( isset( $_REQUEST['GLOBALS'] ) ) { + die( '$GLOBALS overwrite vulnerability'); +} + # Valid web server entry point, enable includes. -# Please don't move this line to includes/Defines.php. This line essentially defines -# a valid entry point. If you put it in includes/Defines.php, then any script that includes -# it becomes an entry point, thereby defeating its purpose. +# Please don't move this line to includes/Defines.php. This line essentially +# defines a valid entry point. If you put it in includes/Defines.php, then +# any script that includes it becomes an entry point, thereby defeating +# its purpose. define( 'MEDIAWIKI', true ); + +# Load up some global defines. require_once( './includes/Defines.php' ); +# LocalSettings.php is the per site customization file. If it does not exit +# the wiki installer need to be launched or the generated file moved from +# ./config/ to ./ if( !file_exists( 'LocalSettings.php' ) ) { - $IP = "." ; + $IP = '.'; require_once( 'includes/DefaultSettings.php' ); # used for printing the version ?> - + MediaWiki <?php echo $wgVersion ?> -