From 8ff5c74bdca30cdc536ec0eab0d2a9c560171922 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 10 Nov 2014 12:01:28 -0500 Subject: [PATCH] Copy wl_notificationtimestamp when copying watchlist entries on move When a page is moved, the new title is automatically added to the watchlists of every user watching the old title. But we also need to copy the wl_notificationtimestamp over, otherwise edits from before the move aren't highlighted in the page history and such. Bug: 73219 Change-Id: I657475c28944539daec14f838d3af4c2962a4b93 --- includes/WatchedItem.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index ab136b8954..fbd61199f2 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -401,7 +401,8 @@ class WatchedItem { $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' ); @@ -411,7 +412,8 @@ class WatchedItem { $values[] = array( 'wl_user' => $s->wl_user, 'wl_namespace' => $newnamespace, - 'wl_title' => $newtitle + 'wl_title' => $newtitle, + 'wl_notificationtimestamp' => $s->wl_notificationtimestamp, ); } -- 2.20.1