X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiWatch.php;h=38be178bddaa4dedcf138ede56f8c57590403513;hp=d257e9005fe3432d7e5e540d44116866481dc21e;hb=6b3e5511fb848890f174690885e748b90389c0b8;hpb=70d23443d4c2c140a350bc365fb22b9d0daeca57 diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php index d257e9005f..38be178bdd 100644 --- a/includes/api/ApiWatch.php +++ b/includes/api/ApiWatch.php @@ -1,9 +1,5 @@ @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'; } }