X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FWatchAction.php;h=0eba613a201154d73a5d44a3f890a5671d7e50a3;hb=dcd612a6a08e6f647cc313e22557c87d65de5006;hp=e12a7276338231a4d99b442e7569f88b7f0790a2;hpb=237d3271fd313ebe09858a5c442a91216a7b61cf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/WatchAction.php b/includes/actions/WatchAction.php index e12a727633..0eba613a20 100644 --- a/includes/actions/WatchAction.php +++ b/includes/actions/WatchAction.php @@ -40,9 +40,7 @@ class WatchAction extends FormAction { } public function onSubmit( $data ) { - self::doWatch( $this->getTitle(), $this->getUser() ); - - return true; + return self::doWatch( $this->getTitle(), $this->getUser() ); } protected function checkCanExecute( User $user ) { @@ -80,8 +78,6 @@ class WatchAction extends FormAction { $this->getOutput()->addWikiMsg( $msgKey, $this->getTitle()->getPrefixedText() ); } - /* Static utility methods */ - /** * Watch or unwatch a page * @since 1.22 @@ -177,19 +173,6 @@ class WatchAction extends FormAction { 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; }