From 71b61a25b7c24021e838ddd9e8d9bf03df21d89b Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 11 Sep 2010 20:23:01 +0000 Subject: [PATCH] do_copy_newtalk_to_watchlist() is not called anymore since ages (r9674), so remove it --- maintenance/updaters.inc | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index a237df5e1d..ee1b981132 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -97,42 +97,6 @@ function do_watchlist_update() { } } -function do_copy_newtalk_to_watchlist() { - $dbw = wfGetDB( DB_MASTER ); - $res = $dbw->safeQuery( 'SELECT user_id, user_ip FROM !', - $dbw->tableName( 'user_newtalk' ) ); - $num_newtalks = $dbw->numRows( $res ); - wfOut( "Now converting $num_newtalks user_newtalk entries to watchlist table entries ... \n" ); - - $user = new User(); - for ( $i = 1; $i <= $num_newtalks; $i++ ) { - $wluser = $dbw->fetchObject( $res ); - if ( $wluser->user_id == 0 ) { # anonymous users ... have IP numbers as "names" - if ( $user->isIP( $wluser->user_ip ) ) { # do only if it really looks like an IP number (double checked) - $dbw->replace( 'watchlist', - array( array( 'wl_user', 'wl_namespace', 'wl_title', 'wl_notificationtimestamp' ) ), - array( 'wl_user' => 0, - 'wl_namespace' => NS_USER_TALK, - 'wl_title' => $wluser->user_ip, - 'wl_notificationtimestamp' => '19700101000000' - ), 'updaters.inc::do_watchlist_update2' - ); - } - } else { # normal users ... have user_ids - $user->setID( $wluser->user_id ); - $dbw->replace( 'watchlist', - array( array( 'wl_user', 'wl_namespace', 'wl_title', 'wl_notificationtimestamp' ) ), - array( 'wl_user' => $user->getID(), - 'wl_namespace' => NS_USER_TALK, - 'wl_title' => $user->getName(), - 'wl_notificationtimestamp' => '19700101000000' - ), 'updaters.inc::do_watchlist_update3' - ); - } - } - wfOut( "Done.\n" ); -} - /** * 1.4 betas were missing the 'binary' marker from logging.log_title, * which causes a collation mismatch error on joins in MySQL 4.1. -- 2.20.1