https://bugzilla.wikimedia.org/show_bug.cgi?id=34377
Web browser: ---
Bug #: 34377
Summary: action=watch parses message using "API" instead of the
page being watched or unwatched
Product: MediaWiki
Version: 1.19-svn
Platform: All
OS/Version: All
Status: NEW
Keywords: need-review, patch
Severity: normal
Priority: Unprioritized
Component: API
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
Created attachment 10002
--> https://bugzilla.wikimedia.org/attachment.cgi?id=10002
Patch to set $wgTitle so action=watch parses messages correctly.
The API's action=watch parses MediaWiki:Addedwatchtext or
MediaWiki:Removedwatchtext (as appropriate) and returns it as "message" in the
response. However, when these messages are parsed they are parsed with the
current page set to "API" rather than the page being watched or unwatched,
which means that magic words such as {{NAMESPACE}} or {{TALKSPACE}} will return
the wrong value. [[en:MediaWiki:Addedwatchtext]], for example, uses these magic
words to provide a better response to the user when watch is used on a talk
page.
The problem seems easy enough to fix: since wfMsgExt doesn't pass a title,
MessageCache uses $wgTitle. So if we just set $wgTitle appropriately from the
API's watch module, everything works as it should.
As a workaround, affected wikis can use {{NAMESPACE:$1}} and the like in their
messages.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l