* @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;
}
$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'
);
$values[] = array(
'wl_user' => $s->wl_user,
'wl_namespace' => $newnamespace,
- 'wl_title' => $newtitle
+ 'wl_title' => $newtitle,
+ 'wl_notificationtimestamp' => $s->wl_notificationtimestamp,
);
}