Commit graph

8 commits

Author SHA1 Message Date
Baha
036b9c4167 Make API documentation links language aware
Links generated by the API are now aware of the user's preferred
language and will show documents in that language if available.

To test, log in to mediawiki.org and set your language preference to 'es',
then on an MediaWiki installation with this patch view the generated
expanded API help at `api.php?action=help&recursivesubmodules=1&modules=main`.
Each link to documentation on mediawiki.org should take you to its
translated /es subpage, if one exists.

Bug: T104518
Change-Id: I339a1f3ae1bce9d759cf251899d57c32b1def91e
2017-04-05 11:08:25 -04:00
Brad Jorsch
2456395c41 ApiClearHasMsg: Clean up after I341b395e
Since I341b395e, $this->getRequest()->wasPosted() should never be false.
So don't bother testing for it.

Change-Id: Iccc60424ed5442d950f4968297fdd18001b3a02a
2017-01-03 14:23:32 -05:00
Brad Jorsch
080370fb5b API: Make action=clearhasmsg require POST
Bug: T146526
Change-Id: I341b395e532e7bdc7816f0deae8c6e5e8c9e8f3b
2016-11-29 14:42:14 -05:00
Aaron Schulz
08bd9b517e Avoid DBPerformance warnings in ApiClearHasMsg
Change-Id: I592d0718204376276b3508bf32b9dc446a05b351
2016-09-23 20:28:21 -07:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Brad Jorsch
f62bc7536e API: Fix access on getExamplesMessages
ApiBase declares it protected, but for some reason I had made it public
in all subclasses.

Change-Id: I8a50d4f47e66c7f09137968d3941dc5cdc1d28e4
2014-10-29 11:15:27 -04:00
Brad Jorsch
ad225f501c API: Internationalize all remaining core API modules
This also adds some new ApiBase::PARAM_* constants to generate more
helpful help, and a method to override the default description message
for the use of ApiDisabled and ApiQueryDisabled.

Bug: 71638
Change-Id: Ic0c3d232e0498d58a043037e2e0c6f0b1c3edad3
2014-10-20 16:56:35 -04:00
Petr Bena
2077a43b5a API: created a new api to flag messages as read
New api is called "ClearHasMsg" and does nothing but erase a new message
flag from currently logged in user.

This is useful for tools that can read the new messages using some api, or some
other way (loading the text using different session, preload the text using a
buffer where it's unrevealed later if user actually did read it, or closed the
application before), so it can be useful in situations when you need to flag new
messages as read in a different time than that when you actually read them.

Bug: 64238
Change-Id: Ife575711c32bb8e3bcac789de4a6b37e1888d032
2014-09-06 21:26:40 +00:00