X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiWatch.php;h=3a7a082148dce34d2dd31b31db7f78c3b2ed8865;hb=17914cc990c375340b688900b7782f1d7d5339fc;hp=4e5e000115d75f5b9bac70933bacbedf1fffd36f;hpb=601519ee36462faabacf4547c9aefaf7e8726476;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php index 4e5e000115..3a7a082148 100644 --- a/includes/api/ApiWatch.php +++ b/includes/api/ApiWatch.php @@ -80,7 +80,7 @@ class ApiWatch extends ApiBase { if ( $extraParams ) { $p = $this->getModulePrefix(); $this->dieUsage( - "The parameter {$p}title can not be used with " . implode( ", ", $extraParams ), + "The parameter {$p}title can not be used with " . implode( ', ', $extraParams ), 'invalidparammix' ); } @@ -110,14 +110,16 @@ class ApiWatch extends ApiBase { $status = UnwatchAction::doUnwatch( $title, $user ); $res['unwatched'] = $status->isOK(); if ( $status->isOK() ) { - $res['message'] = $this->msg( 'removedwatchtext', $title->getPrefixedText() ) + $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() ) { - $res['message'] = $this->msg( 'addedwatchtext', $title->getPrefixedText() ) + $msgKey = $title->isTalkPage() ? 'addedwatchtext-talk' : 'addedwatchtext'; + $res['message'] = $this->msg( $msgKey, $title->getPrefixedText() ) ->title( $title )->parseAsBlock(); } }