maxlag is the default mechanism most bots and libraries use in
determining when to back off due to wiki overload. However these days,
there are other things that should be considered when asking bots to
back off, one of those is job queue size.
For compatibility and simplicity of use, the number of jobs is converted
into something resembling seconds using a configurable factor. We also
output the total number of jobs in the API error output so more
sophisticated clients can do a more advanced back off.
Bug: T160003
Change-Id: Iedae2344a3d93202efbdd1bf807cef6165b6257a
If the page exists, it only checks edit rights, otherwise it
checks both edit and create rights.
This would only matter on wikis that have a non-default rights
configuration where there are users with undelete rights but a
restriction level enabled that prevents them from creating/editing
pages (or they otherwise aren't allowed to edit/create)
It should be noted that the error messages aren't used in the
normal UI currently, but they could be in the future, and
extensions could potentially be using them (The backend functions
return them, but the UI functions in Special:Undelete ignore
them)
Bug: T108138
Change-Id: I164b80534cf89e0afca264e9de07431484af8508
Stuff like passwords and CSRF tokens shouldn't be in the logs.
The fact of being sensitive is intentionally separated from the need to
be in the POST body because, for example, the wltoken parameter to
ApiQueryWatchlist needs to be in the query string to serve its purpose
but still shouldn't be logged.
Bug: T125177
Change-Id: I1d61f4dcf792d77401ee2e2988b1afcb2a2ad58f
This is the correct/canonical index name. For usages on mysql it will
map to the unprefixed version.
Bug: T154872
Change-Id: Ie2daf7b33428855ac59c85bf04a99a9bca7feba1
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
Passing in the 'parsewarnings' property will return warnings related
to parsing content.
Bug: T92634
Change-Id: I7e54765ee9a24ffb78e7763f73a520151023baf6
This reverts most of commit c84ba4d864.
The changes made there are no longer needed, and nothing in Gerrit seems
to have started using them since they were added.
The added constants in WikiPage, WikiPage::getLastPurgeTimestamp(), and
Article::getLastPurgeTimestamp() are deprecated, useless, and unused,
but not removed yet since they snuck into 1.28 so we can't revert them
without a deprecation period. Sigh.
Bug: T145649
Change-Id: I526fd4e004bee84c831a4cee71e44e92ee73480b
Meanwhile, also change ApiQueryAllImages to search by
user ID instead of username. This is also how ContribsPages,
LogPager, ... work already.
This will use the new index on img_user. The old index is still
around, but is likely not going to be used in practice (users
have to logged in to upload)
Do not merge until I4db7bd0f917a428f40eb315246f89d49c7ae5b6a has
been deployed.
Bug: T125071
Bug: T121865
Change-Id: Ida22555f00530f393e739366fa9e79ecabf3c0eb