Merge "Revert "selenium: add new message banner test to user spec""
[lhc/web/wiklou.git] / includes / api / ApiWatch.php
index d257e90..38be178 100644 (file)
@@ -1,9 +1,5 @@
 <?php
 /**
- *
- *
- * Created on Jan 4, 2008
- *
  * Copyright © 2008 Yuri Astrakhan "<Firstname><Lastname>@gmail.com",
  *
  * This program is free software; you can redistribute it and/or modify
@@ -60,7 +56,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 +106,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() ) {
@@ -193,6 +179,6 @@ class ApiWatch extends ApiBase {
        }
 
        public function getHelpUrls() {
-               return 'https://www.mediawiki.org/wiki/API:Watch';
+               return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Watch';
        }
 }