X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=index.php;h=f18fa8a6ed3e16a21b43391b2700fe1659ba1e51;hb=514122332da1fcb77a6d2f3b9963788b1bbcfb7d;hp=2dade9705992f09f6a3c3b49bda458de50cb11a7;hpb=ce5b29ff095d6f42f73264b5039fd6b6ec0eaee9;p=lhc%2Fweb%2Fwiklou.git diff --git a/index.php b/index.php index 2dade97059..f18fa8a6ed 100644 --- a/index.php +++ b/index.php @@ -3,35 +3,50 @@ * Main wiki script; see docs/design.txt * @package MediaWiki */ +$wgRequestTime = microtime(true); -$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 ?> -