X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=fbfef1fb90ff9a3149239415b07f970b58bc8830;hb=d5212f304fd52a8390e06e1fcc9180a1562588ba;hp=e79d13ccfcaa5d08f45d9c4e1dc4972e526e7423;hpb=84a843e168c2bf966f361c8e2fdc4441c44941b4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index e79d13ccfc..fbfef1fb90 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -48,10 +48,10 @@ if ( !isset( $wgVersion ) ) { $ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' ); if ( $wgScript === false ) { - $wgScript = "$wgScriptPath/index$wgScriptExtension"; + $wgScript = "$wgScriptPath/index.php"; } if ( $wgLoadScript === false ) { - $wgLoadScript = "$wgScriptPath/load$wgScriptExtension"; + $wgLoadScript = "$wgScriptPath/load.php"; } if ( $wgArticlePath === false ) { @@ -186,7 +186,7 @@ if ( !$wgLocalFileRepo ) { 'name' => 'local', 'directory' => $wgUploadDirectory, 'scriptDirUrl' => $wgScriptPath, - 'scriptExtension' => $wgScriptExtension, + 'scriptExtension' => '.php', 'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath, 'hashLevels' => $wgHashedUploadDirectory ? 2 : 0, 'thumbScriptUrl' => $wgThumbnailScriptPath, @@ -373,6 +373,15 @@ if ( $wgResourceLoaderMaxQueryLength === false ) { unset( $suhosinMaxValueLength ); } +// Ensure the minimum chunk size is less than PHP upload limits or the maximum +// upload size. +$wgMinUploadChunkSize = min( + $wgMinUploadChunkSize, + $wgMaxUploadSize, + wfShorthandToInteger( ini_get( 'upload_max_filesize' ), 1e100 ), + wfShorthandToInteger( ini_get( 'post_max_size' ), 1e100 ) - 1024 # Leave room for other parameters +); + /** * Definitions of the NS_ constants are in Defines.php * @private @@ -503,10 +512,6 @@ require_once "$IP/includes/compat/normal/UtfNormalUtil.php"; $ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' ); -if ( $wgScriptExtension !== '.php' || defined( 'MW_ENTRY_PHP5' ) ) { - wfWarn( 'Script extensions other than ".php" are deprecated.' ); -} - if ( $wgCanonicalServer === false ) { $wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP ); }