* (bug 32506) Inconsistent behavior for Special:EditWatchlist/raw when submitting...
authorSam Reed <reedy@users.mediawiki.org>
Sun, 20 Nov 2011 10:58:46 +0000 (10:58 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 20 Nov 2011 10:58:46 +0000 (10:58 +0000)
Patch by Brad Jorsch

includes/specials/SpecialEditWatchlist.php

index 792149c..e305ff8 100644 (file)
@@ -152,7 +152,14 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                } else {
                        $this->clearWatchlist();
                        $this->getUser()->invalidateCache();
-                       $this->successMessage .= wfMessage(
+
+                       if( count( $current ) > 0 ){
+                               $this->successMessage = wfMessage( 'watchlistedit-raw-done' )->parse();
+                       } else {
+                               return false;
+                       }
+
+                       $this->successMessage .= ' ' . wfMessage(
                                'watchlistedit-raw-removed',
                                $this->getLang()->formatNum( count( $current ) )
                        );