newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname, 1 ); if( !$wgDatabase->isOpen() ) { # Appears to have failed echo( "A connection to the database could not be established. Check the\n" ); # Let's be a bit clever and guess at what's wrong if( isset( $wgDBadminuser ) && isset( $wgDBadminpassword ) ) { # Tell the user the value(s) are wrong echo( 'values of $wgDBadminuser and $wgDBadminpassword.' . "\n" ); } exit(); } print "Going to run database updates for $wgDBname\n"; print "Depending on the size of your database this may take a while!\n"; if( !isset( $options['quick'] ) ) { print "Abort with control-c in the next five seconds... "; for ($i = 6; $i >= 1;) { print_c($i, --$i); sleep(1); } echo "\n"; } if ( isset( $options['doshared'] ) ) { $doShared = true; } else { $doShared = false; } do_all_updates( $doShared ); print "Done.\n"; ?>