Make SqlBagOStuff respect WRITE_SYNC flag
[lhc/web/wiklou.git] / includes / Setup.php
index 67c99c9..0b6b018 100644 (file)
@@ -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
@@ -680,7 +689,7 @@ $wgTitle = null;
 Profiler::instance()->scopedProfileOut( $ps_globals );
 $ps_extensions = Profiler::instance()->scopedProfileIn( $fname . '-extensions' );
 
-// Extension setup functions for extensions other than skins
+// Extension setup functions
 // Entries should be added to this variable during the inclusion
 // of the extension file. This allows the extension to perform
 // any necessary initialisation in the fully initialised environment