Restored method for clearing a watchlist in web UI, and rebuilt code.
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index 1345b76..bae5ab3 100644 (file)
@@ -50,6 +50,8 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                if ( $mode !== false ) {
                        if ( $mode === SpecialEditWatchlist::EDIT_RAW ) {
                                $title = SpecialPage::getTitleFor( 'EditWatchlist', 'raw' );
+                       } elseif ( $mode === SpecialEditWatchlist::EDIT_CLEAR ) {
+                                $title = SpecialPage::getTitleFor( 'EditWatchlist', 'clear' );
                        } else {
                                $title = SpecialPage::getTitleFor( 'EditWatchlist' );
                        }
@@ -120,7 +122,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
         * Maps old pre-1.23 request parameters Watchlist used to use (different from Recentchanges' ones)
         * to the current ones.
         *
-        * @param FormOptions $parameters
+        * @param FormOptions $opts
         * @return FormOptions
         */
        protected function fetchOptionsFromRequest( $opts ) {
@@ -577,7 +579,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
         * Count the number of items on a user's watchlist
         *
         * @param DatabaseBase $dbr A database connection
-        * @return Integer
+        * @return int
         */
        protected function countItems( $dbr ) {
                # Fetch the raw count