function do_copy_newtalk_to_watchlist() {
global $wgDatabase;
- global $wgCommandLineMode; # this needs to be saved while getID() and getName() are called
$res = $wgDatabase->safeQuery( 'SELECT user_id, user_ip FROM !',
$wgDatabase->tableName( 'user_newtalk' ) );
}
function do_templatelinks_update() {
- global $wgDatabase, $wgLoadBalancer;
+ global $wgDatabase;
$fname = 'do_templatelinks_update';
if ( $wgDatabase->tableExists( 'templatelinks' ) ) {
wfOut( "Creating templatelinks table...\n" );
$wgDatabase->sourceFile( archive( 'patch-templatelinks.sql' ) );
wfOut( "Populating...\n" );
- if ( isset( $wgLoadBalancer ) && $wgLoadBalancer->getServerCount() > 1 ) {
+ if ( wfGetLB()->getServerCount() > 1 ) {
// Slow, replication-friendly update
$res = $wgDatabase->select( 'pagelinks', array( 'pl_from', 'pl_namespace', 'pl_title' ),
array( 'pl_namespace' => NS_TEMPLATE ), $fname );
}
function do_all_updates( $shared = false, $purge = true ) {
- global $wgNewTables, $wgExtModifiedFields, $wgNewFields, $wgRenamedTables, $wgSharedDB, $wgSharedTables, $wgDatabase, $wgDBtype, $IP;
+ global $wgSharedDB, $wgSharedTables, $wgDatabase, $wgDBtype;
wfRunHooks( 'LoadExtensionSchemaUpdates' );
return;
}
- global $wgDatabase;
- $up = new Update( $wgDatabase );
+ $up = DatabaseUpdater::newForDb( $wgDatabase );
$up->doUpdates();
wfOut( "Deleting old default messages (this may take a long time!)..." );
}
function do_log_search_population() {
- global $wgDatabase;
if ( update_row_exists( 'populate log_search' ) ) {
wfOut( "...log_search table already populated.\n" );
return;
}
function do_postgres_updates() {
- global $wgDatabase, $wgVersion, $wgDBmwschema, $wgDBts2schema, $wgShowExceptionDetails, $wgDBuser;
+ global $wgDatabase, $wgDBmwschema, $wgDBts2schema, $wgShowExceptionDetails, $wgDBuser;
# # Gather version numbers in case we need them
$version = $wgDatabase->getServerVersion(); # # long string
array( "watchlist", "wl_user", "(wl_user)" ),
array( "logging", "logging_user_type_time", "(log_user, log_type, log_timestamp)" ),
array( "logging", "logging_page_id_time", "(log_page,log_timestamp)" ),
+ array( "iwlinks", "iwl_prefix_title_from", "(iwl_prefix, iwl_title, iwl_from)" ),
);
$newrules = array(