*/
$wgForceLoadBalancing = (getenv('MW_BALANCE') ? true : false);
+$wgUseNormalUser = (getenv('MW_WIKIUSER') ? true : false);
+if (getenv('MW_PROFILING')) {
+ define('MW_CMDLINE_CALLBACK', 'wfSetProfiling');
+}
+function wfSetProfiling() { $GLOBALS['wgProfiling'] = true; }
+
+$optionsWithArgs = array( 'd' );
/** */
require_once( "commandLine.inc" );
-$line = readconsole( "> " );
+if ( isset( $options['d'] ) ) {
+ $d = $options['d'];
+ if ( $d > 0 ) {
+ $wgDebugLogFile = '/dev/stdout';
+ }
+ if ( $d > 1 ) {
+ foreach ( $wgLoadBalancer->mServers as $i => $server ) {
+ $wgLoadBalancer->mServers[$i]['flags'] |= DBO_DEBUG;
+ }
+ }
+ if ( $d > 2 ) {
+ $wgDebugFunctionEntry = true;
+ }
+}
+
-while ( $line !== false ) {
+while ( ( $line = readconsole( '> ' ) ) !== false ) {
$val = eval( $line . ";" );
if( is_null( $val ) ) {
echo "\n";
if ( function_exists( "readline_add_history" ) ) {
readline_add_history( $line );
}
- $line = readconsole( "> " );
}
print "\n";