* @defgroup Maintenance Maintenance
*/
+if( PHP_SAPI != 'cli' ) {
+ die( "Run me from the command line please.\n" );
+}
+
// Make sure we're on PHP5.3.2 or better
if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) {
// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
define( 'MEDIAWIKI', true );
$wgCommandLineMode = true;
+
# Turn off output buffering if it's on
- @ob_end_flush();
+ while( ob_get_level() > 0 ) {
+ ob_end_flush();
+ }
$this->validateParamsAndArgs();
}