From a5e4919a0747ba0404d1401091fcfba0247e10a0 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 13 Feb 2012 18:42:35 +0000 Subject: [PATCH] * (bug 34377) action=watch now parses messages using the correct title instead of "API" --- RELEASE-NOTES-1.19 | 2 ++ includes/api/ApiWatch.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index d6a3e61078..d9b3cd4fc7 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -281,6 +281,8 @@ production. values is given as an array. * (bug 32948) {{REVISIONID}} and related variables are no longer blank after calling action=purge&forcelinkupdate. +* (bug 34377) action=watch now parses messages using the correct title instead + of "API". === Languages updated in 1.19 === diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php index 4b448d6de2..fa382b3b49 100644 --- a/includes/api/ApiWatch.php +++ b/includes/api/ApiWatch.php @@ -52,11 +52,11 @@ class ApiWatch extends ApiBase { if ( $params['unwatch'] ) { $res['unwatched'] = ''; - $res['message'] = wfMsgExt( 'removedwatchtext', array( 'parse' ), $title->getPrefixedText() ); + $res['message'] = $this->msg( 'removedwatchtext', $title->getPrefixedText() )->title( $title )->parseAsBlock(); $success = UnwatchAction::doUnwatch( $title, $user ); } else { $res['watched'] = ''; - $res['message'] = wfMsgExt( 'addedwatchtext', array( 'parse' ), $title->getPrefixedText() ); + $res['message'] = $this->msg( 'addedwatchtext', $title->getPrefixedText() )->title( $title )->parseAsBlock(); $success = WatchAction::doWatch( $title, $user ); } if ( !$success ) { -- 2.20.1