From 183851b06bd6c52f3cae5375f433da720d410447 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 11 Oct 2006 18:12:39 +0000 Subject: MediaWiki 1.7.1 wiederhergestellt --- maintenance/archives/upgradeWatchlist.php | 67 +++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 maintenance/archives/upgradeWatchlist.php (limited to 'maintenance/archives/upgradeWatchlist.php') diff --git a/maintenance/archives/upgradeWatchlist.php b/maintenance/archives/upgradeWatchlist.php new file mode 100644 index 00000000..b4605a50 --- /dev/null +++ b/maintenance/archives/upgradeWatchlist.php @@ -0,0 +1,67 @@ +user_watch ); + $bits = array(); + foreach( $list as $title ) { + if( $id = $lc->addLink( $title ) and ! $bits[$id]++) { + $sql .= ($i++ ? "," : "") . "({$row->user_id},{$id})"; + } + } + if( ($n++ % 100) == 0 ) echo "$n of $nu users done...\n"; +} +echo "$n users done.\n"; +if( $i ) { + wfQuery( $sql, DB_MASTER ); +} + + +# Add index +# is this necessary? +$sql = "ALTER TABLE watchlist + ADD INDEX wl_user (wl_user), + ADD INDEX wl_page (wl_page)"; +#wfQuery( $sql, DB_MASTER ); + +?> -- cgit v1.2.3-54-g00ecf