Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / api / ApiWatch.php
index d257e90..37d319f 100644 (file)
@@ -60,7 +60,7 @@ class ApiWatch extends ApiBase {
 
                        foreach ( $pageSet->getMissingTitles() as $title ) {
                                $r = $this->watchTitle( $title, $user, $params );
-                               $r['missing'] = 1;
+                               $r['missing'] = true;
                                $res[] = $r;
                        }
 
@@ -110,19 +110,9 @@ class ApiWatch extends ApiBase {
                if ( $params['unwatch'] ) {
                        $status = UnwatchAction::doUnwatch( $title, $user );
                        $res['unwatched'] = $status->isOK();
-                       if ( $status->isOK() ) {
-                               $msgKey = $title->isTalkPage() ? 'removedwatchtext-talk' : 'removedwatchtext';
-                               $res['message'] = $this->msg( $msgKey, $title->getPrefixedText() )
-                                       ->title( $title )->parseAsBlock();
-                       }
                } else {
                        $status = WatchAction::doWatch( $title, $user );
                        $res['watched'] = $status->isOK();
-                       if ( $status->isOK() ) {
-                               $msgKey = $title->isTalkPage() ? 'addedwatchtext-talk' : 'addedwatchtext';
-                               $res['message'] = $this->msg( $msgKey, $title->getPrefixedText() )
-                                       ->title( $title )->parseAsBlock();
-                       }
                }
 
                if ( !$status->isOK() ) {