API: (bug 20816) Editing a page with &watchlist=preferences (default) unwatches it...
authorRoan Kattouw <catrope@users.mediawiki.org>
Sat, 26 Sep 2009 09:22:44 +0000 (09:22 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sat, 26 Sep 2009 09:22:44 +0000 (09:22 +0000)
includes/api/ApiEditPage.php

index a9d489d..bc2ede0 100644 (file)
@@ -180,7 +180,7 @@ class ApiEditPage extends ApiBase {
                                break;
                        case 'preferences':
                                if ($titleObj->exists())
-                                       $watch = $wgUser->getOption('watchdefault');
+                                       $watch = $wgUser->getOption('watchdefault') || $titleObj->userIsWatching();
                                else
                                        $watch = $wgUser->getOption('watchcreations');
                                break;