}
$dbw = wfGetDB( DB_MASTER );
- foreach( array_chunk( $rows, 100 ) as $toInsert ) {
+ foreach ( array_chunk( $rows, 100 ) as $toInsert ) {
// Use INSERT IGNORE to avoid overwriting the notification timestamp
// if there's already an entry for this page
$dbw->insert( 'watchlist', $toInsert, __METHOD__, 'IGNORE' );
$newtitle = $nt->getDBkey();
$dbw = wfGetDB( DB_MASTER );
- $res = $dbw->select( 'watchlist', 'wl_user',
+ $res = $dbw->select( 'watchlist',
+ array( 'wl_user', 'wl_notificationtimestamp' ),
array( 'wl_namespace' => $oldnamespace, 'wl_title' => $oldtitle ),
__METHOD__, 'FOR UPDATE'
);
$values[] = array(
'wl_user' => $s->wl_user,
'wl_namespace' => $newnamespace,
- 'wl_title' => $newtitle
+ 'wl_title' => $newtitle,
+ 'wl_notificationtimestamp' => $s->wl_notificationtimestamp,
);
}