user_id; $oldpass = $row->user_password; $newpass = md5( "{$id}-{$oldpass}" ); $sql = "UPDATE user SET user_password='{$newpass}' " . "WHERE user_id={$id}"; wfQuery( $sql, DB_WRITE, $fname ); } } function do_ipblocks_update() { if ( wfFieldExists( "ipblocks", "ipb_id" ) ) { echo "...ipblocks table is up to date.\n"; } else { echo "Updating ipblocks table... "; dbsource( "maintenance/archives/patch-ipblocks.sql" ); echo "ok\n"; } } function do_interwiki_update() { # Check that interwiki table exists; if it doesn't source it if( table_exists( "interwiki" ) ) { echo "...already have interwiki table\n"; return true; } echo "Creating interwiki table: "; dbsource( "maintenance/archives/patch-interwiki.sql" ); echo "ok\n"; echo "Adding default interwiki definitions: "; dbsource( "maintenance/interwiki.sql" ); echo "ok\n"; } function do_index_update() { # Check that proper indexes are in place $meta = field_info( "recentchanges", "rc_timestamp" ); if( $meta->multiple_key == 0 ) { echo "Updating indexes to 20031107: "; dbsource( "maintenance/archives/patch-indexes.sql" ); echo "ok\n"; return true; } echo "...indexes seem up to 20031107 standards\n"; return false; } function do_linkscc_update() { // Create linkscc if necessary global $rconn; if( table_exists( "linkscc" ) ) { echo "...have linkscc table.\n"; } else { echo "Adding linkscc table... "; dbsource( "maintenance/archives/patch-linkscc.sql" ); echo "ok\n"; } } ?>