X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiSetNotificationTimestamp.php;h=3f6f14c1b3e04df5379b2e5b45b0ad6a89e49164;hb=1aac226b92a73a7be6787c6eb425e680bf1335b6;hp=7e9f56d09c100039e79d7ae17b8807dcf7bcdca4;hpb=a5c7fd0db2d962834127ec2362d0dfe8ef6852d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiSetNotificationTimestamp.php b/includes/api/ApiSetNotificationTimestamp.php index 7e9f56d09c..3f6f14c1b3 100644 --- a/includes/api/ApiSetNotificationTimestamp.php +++ b/includes/api/ApiSetNotificationTimestamp.php @@ -93,13 +93,14 @@ class ApiSetNotificationTimestamp extends ApiBase { $titles = $pageSet->getGoodTitles(); $title = reset( $titles ); if ( $title ) { - $revid = $title->getNextRevisionID( $params['newerthanrevid'], Title::READ_LATEST ); - if ( $revid ) { - $timestamp = $dbw->timestamp( - MediaWikiServices::getInstance()->getRevisionStore()->getTimestampFromId( $title, $revid ) - ); - } else { - $timestamp = null; + $timestamp = null; + $rl = MediaWikiServices::getInstance()->getRevisionLookup(); + $currRev = $rl->getRevisionById( $params['newerthanrevid'], Title::READ_LATEST ); + if ( $currRev ) { + $nextRev = $rl->getNextRevision( $currRev, Title::READ_LATEST ); + if ( $nextRev ) { + $timestamp = $dbw->timestamp( $nextRev->getTimestamp() ); + } } } }