} 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 );
* @return bool
*/
public static function batchAddWatch( array $items ) {
- $section = new ProfileSection( __METHOD__ );
if ( wfReadOnly() ) {
return false;
* @return bool
*/
public function removeWatch() {
- wfProfileIn( __METHOD__ );
// Only loggedin user can have a watchlist
if ( wfReadOnly() || $this->mUser->isAnon() || !$this->isAllowed( 'editmywatchlist' ) ) {
- wfProfileOut( __METHOD__ );
return false;
}
$this->watched = false;
- wfProfileOut( __METHOD__ );
return $success;
}