X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialEditWatchlist.php;h=09ea9ea6ac99b191d3fdcbf39daa5d2becaa3b03;hb=467ee1e82f1526ba4671f52936fd279eb5cda4f6;hp=d2940e4a02f174efc3248c4c35ef59dac7646d07;hpb=7e105610397b55d67f42f31496e92496477500e3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index d2940e4a02..09ea9ea6ac 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -29,6 +29,7 @@ use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkTarget; use MediaWiki\MediaWikiServices; +use Wikimedia\Rdbms\DBReadOnlyError; /** * Provides the UI through which users can perform editing @@ -451,6 +452,10 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * Remove all titles from a user's watchlist */ private function clearWatchlist() { + if ( $this->getConfig()->get( 'ReadOnlyWatchedItemStore' ) ) { + throw new DBReadOnlyError( null, 'The watchlist is currently readonly.' ); + } + $dbw = wfGetDB( DB_MASTER ); $dbw->delete( 'watchlist',