diff options
author | Cindy Cicalese <cindom@gmail.com> | 2021-04-12 23:03:50 -0400 |
---|---|---|
committer | Cindy Cicalese <cindom@gmail.com> | 2021-04-21 00:37:40 -0400 |
commit | a384acffa7425b3c02ef2b08a851b8563bbec5ca (patch) | |
tree | 1c8e4745ab533477da393149c72a0504901f1c1f /includes/FileDeleteForm.php | |
parent | ce6a4ef45e623c248b29ece228bb72e7fc27f51a (diff) | |
download | mediawikicore-a384acffa7425b3c02ef2b08a851b8563bbec5ca.tar.gz mediawikicore-a384acffa7425b3c02ef2b08a851b8563bbec5ca.zip |
Use WatchlistManager in several classes
Change-Id: I720629e08373736b5fc1e12563b5059311b113e1
Diffstat (limited to 'includes/FileDeleteForm.php')
-rw-r--r-- | includes/FileDeleteForm.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index aa4040c78e1d..9b60658c4235 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -144,7 +144,7 @@ class FileDeleteForm { // file, otherwise go back to the description page $this->out->addReturnTo( $this->oldimage ? $this->title : Title::newMainPage() ); - WatchAction::doWatchOrUnwatch( + MediaWikiServices::getInstance()->getWatchlistManager()->setWatch( $request->getCheck( 'wpWatch' ), $this->title, $this->user @@ -269,8 +269,9 @@ class FileDeleteForm { $this->out->addModules( 'mediawiki.action.delete' ); $this->out->addModuleStyles( 'mediawiki.action.styles' ); - $checkWatch = $services->getUserOptionsLookup() - ->getBoolOption( $this->user, 'watchdeletion' ) || $this->user->isWatched( $this->title ); + $checkWatch = + $services->getUserOptionsLookup()->getBoolOption( $this->user, 'watchdeletion' ) || + $services->getWatchlistManager()->isWatched( $this->user, $this->title ); $this->out->enableOOUI(); |