Followup to r64962: Fixed watchlist parameter in API. User options watchdeletions...
[lhc/web/wiklou.git] / includes / api / ApiDelete.php
index 8c6c10e..f5294dd 100644 (file)
@@ -88,12 +88,10 @@ class ApiDelete extends ApiBase {
                                $watch = 'watch';
                        } elseif ( $params['unwatch'] ) {
                                $watch = 'unwatch';
-                       } elseif ( $wgUser->getOption( 'watchdeletion' ) ) {
-                               $watch = 'watch';
                        } else {
                                $watch = $params['watchlist'];
                        }
-                       $this->setWatch( $watch, $titleObj );
+                       $this->setWatch( $watch, $titleObj, 'watchdeletion' );
                }
 
                $r = array( 'title' => $titleObj->getPrefixedText(), 'reason' => $reason );