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'
);
}
$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();
}
}