X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FWatchAction.php;h=aaccc0c489e95170bb429846f9e567ba1edd64ff;hb=62c36e82cf424f6ef51b524b2da41ff798111d83;hp=e12a7276338231a4d99b442e7569f88b7f0790a2;hpb=0a873ed202207e3ab14e6ff372d7c0e9e0c95ea5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/WatchAction.php b/includes/actions/WatchAction.php index e12a727633..aaccc0c489 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 @@ -185,8 +181,10 @@ class WatchAction extends FormAction { * @param string $action Optionally override the action to 'watch' * @return string Token * @since 1.18 + * @deprecated since 1.32 Use WatchAction::getWatchToken() with action 'unwatch' directly. */ public static function getUnwatchToken( Title $title, User $user, $action = 'unwatch' ) { + wfDeprecated( __METHOD__, '1.32' ); return self::getWatchToken( $title, $user, $action ); }