Aaron Schulz has submitted this change and it was merged.

Change subject: Made WatchedItem use Revision::getTimestampFromId
......................................................................


Made WatchedItem use Revision::getTimestampFromId

Change-Id: I3a895a69e8f4678b82a4e50f70d6bfc4df932d74
---
M includes/WatchedItem.php
1 file changed, 1 insertion(+), 5 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php
index 4d22692..524e701 100644
--- a/includes/WatchedItem.php
+++ b/includes/WatchedItem.php
@@ -240,11 +240,7 @@
                        } else {
                                // Oldid given and isn't the latest; update the 
timestamp.
                                // This will result in no further notification 
emails being sent!
-                               $dbr = wfGetDB( DB_SLAVE );
-                               $notificationTimestamp = $dbr->selectField(
-                                       'revision', 'rev_timestamp',
-                                       array( 'rev_page' => 
$title->getArticleID(), 'rev_id' => $oldid )
-                               );
+                               $notificationTimestamp = 
Revision::getTimestampFromId( $title, $oldid );
                                // We need to go one second to the future 
because of various strict comparisons
                                // throughout the codebase
                                $ts = new MWTimestamp( $notificationTimestamp );

-- 
To view, visit https://gerrit.wikimedia.org/r/203881
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a895a69e8f4678b82a4e50f70d6bfc4df932d74
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to