From: Brad Jorsch Date: Mon, 10 Nov 2014 17:01:28 +0000 (-0500) Subject: Copy wl_notificationtimestamp when copying watchlist entries on move X-Git-Tag: 1.31.0-rc.0~13339 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=8ff5c74bdca30cdc536ec0eab0d2a9c560171922;p=lhc%2Fweb%2Fwiklou.git 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 --- 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, ); }