}
public function onSubmit( $data ) {
- self::doWatch( $this->getTitle(), $this->getUser() );
-
- return true;
+ return self::doWatch( $this->getTitle(), $this->getUser() );
}
protected function checkCanExecute( User $user ) {
$this->getOutput()->addWikiMsg( $msgKey, $this->getTitle()->getPrefixedText() );
}
- /* Static utility methods */
-
/**
* Watch or unwatch a page
* @since 1.22
return $user->getEditToken( $action );
}
- /**
- * Get token to unwatch (or watch) a page for a user
- *
- * @param Title $title Title object of page to unwatch
- * @param User $user User for whom the action is going to be performed
- * @param string $action Optionally override the action to 'watch'
- * @return string Token
- * @since 1.18
- */
- public static function getUnwatchToken( Title $title, User $user, $action = 'unwatch' ) {
- return self::getWatchToken( $title, $user, $action );
- }
-
public function doesWrites() {
return true;
}