summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2022-01-08 10:54:03 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2022-01-08 10:54:03 +0000
commit927e06c990b189a3e7776e37080c659c7cc63463 (patch)
tree0564c885040862fcbc31af87f188d7ced78b2cc2
parent5254ddea2dc8aad890fdd65685b7da87307e61b5 (diff)
parent260ca5ba069bbc7bb3fd50d52a56c4f49fd8cecd (diff)
Merge "Wrap StatusValue in Status for HTMLForm submit callback"
-rw-r--r--includes/actions/WatchAction.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/actions/WatchAction.php b/includes/actions/WatchAction.php
index 725816dc36a1..5d5377cb85e3 100644
--- a/includes/actions/WatchAction.php
+++ b/includes/actions/WatchAction.php
@@ -81,16 +81,16 @@ class WatchAction extends FormAction {
}
public function onSubmit( $data ) {
- $expiry = $this->getRequest()->getVal( 'wp' . $this->expiryFormFieldName );
-
- // Even though we're never unwatching here, use WatchlistManager::setWatch() because it also checks for
- // changed expiry.
- return $this->watchlistManager->setWatch(
+ // Even though we're never unwatching here, use WatchlistManager::setWatch()
+ // because it also checks for changed expiry.
+ $result = $this->watchlistManager->setWatch(
true,
$this->getContext()->getAuthority(),
$this->getTitle(),
- $expiry
+ $this->getRequest()->getVal( 'wp' . $this->expiryFormFieldName )
);
+
+ return Status::wrap( $result );
}
protected function checkCanExecute( User $user ) {