| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
It is the job of git and svn to provide this information/metadata.
The form was different, some with short, some with long month name
some with leading zero at the day, some without.
The year is also present in the Copyright clause
Change-Id: If006907b82b9e45f13cfa2e45d41107a95570e1a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
API warnings and error messages are currently hard-coded English
strings. This patch changes that.
With a few exceptions, this patch should be compatible with non-updated
extensions:
* The change to ApiBase::$messageMap will blow up anything trying to
mess with it.
* The changes to the 'ApiCheckCanExecute' hook will cause a wrong
(probably unparsed) error message to be emitted for extensions not
already using an ApiMessage. Unless they're currently broken like
Wikibase.
Bug: T37074
Bug: T47843
Depends-On: Ia2b66b57cd4eaddc30b3ffdd7b97d6ca3e02d898
Depends-On: I2e1bb975bb0045476c03ebe6cdec00259bae22ec
Depends-On: I53987bf87c48f6c00deec17a8e957d24fcc3eaa6
Depends-On: Ibf93a459eb62d30f7c70d20e91ec9faeb80d10ed
Depends-On: I3cf889811f44a15935e454dd42f081164d4a098c
Depends-On: Ieae527de86735ddcba34724730e8730fb277b99b
Depends-On: I535344c29d51521147c2a26c341dae38cec3e931
Change-Id: Iae0e2ce3bd42dd4776a9779664086119ac188412
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add 'tags' parameters to appropriate API modules
- Add tag-adding logic to appropriate functions that carry out
relevant functions
- ManualLogEntry::{set,get}Tags to handle adding tags to log
entries in a cleaner fashion
- Use ManualLogEntry::setTags in LocalFile::recordUpload2
Bug: T97720
Change-Id: I98c52da7985623bfdafda2dc2dae937b39b72419
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Moves a frequently used snippet of code into APIBase to throw a
usage exception with block info.
Change-Id: I9bd0b2804e9e246f6d53031b04af48f111c0814c
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Potentially long running POST requests often use multiple transactions,
talk to multiple services, or defer updates. Try to make sure they have
a chance to complete all of the work. WMF already sets ignore_user_abort()
across the board in config, but this applies it to key spots for all
installs, in addition to bumping the time limit.
* Eventually this can lower the need for high overall time limits.
Bug: T102890
Change-Id: I893ddd773064dcd63b5b24c84c6391974f4b5aee
|
|
|
|
|
| |
Bug: T95072
Change-Id: I295d74d5f33e6dd1072a1e85710a02597a46e14d
|
|
|
|
|
|
| |
* This avoids the overhead of an extra function call
Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
|
|
|
|
|
|
|
| |
ApiBase declares it protected, but for some reason I had made it public
in all subclasses.
Change-Id: I8a50d4f47e66c7f09137968d3941dc5cdc1d28e4
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current token handling is a mess. This simplifies things greatly:
* *All* tokens are obtained from action=query&meta=tokens, rather than
being spread over action=tokens, action=query&prop=info,
action=query&prop=revisions, action=query&prop=recentchanges, and
action=query&prop=users. All these old methods are deprecated.
* Similarly, there is only one hook to register new token types. All old
hooks are deprecated.
* All tokens are cacheable.
* Most token types are dropped in favor of a 'csrf' token. They already
were returning the same token anyway.
* All token-using modules will document the required token type in a
standard manner in action=help and are documented in machine-readable
fashion in action=paraminfo.
Note this will require updates to all extensions using tokens.
Change-Id: I2793a3f2dd64a4bebb0b4d065e09af1e9f63fb89
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The format for 'props' was never specified and the list for 'errors' is
impossible to keep updated when considering that many errors come from
MediaWiki backend code and extension hook functions. And since there
doesn't seem to be any real use case for either of these, let's just
kill both of them instead of wasting effort on trying to fix them.
Note that neither getResultProperties nor getPossibleErrors are called
from any extensions in gerrit, and none of the other deprecated methods
are called outside of the implementations of those two methods. Removing
the obsolete methods is left to the maintainers of the extensions, as
keeping them hurts nothing and is needed to maintain compatibility with
earlier versions of MediaWiki.
Change-Id: Ie11a401d60c834059fbf1b5625ca8ea093b3337c
|
|
|
|
| |
Change-Id: Ic025412ed74d9cffad48a3ab04788d46ab43befb
|
|
|
|
|
|
|
| |
Strange that action=undelete didn't support this already.
Bug: 40817
Change-Id: Ia864158370411e555f63f70588ebd305a756d6f5
|
|
|
|
| |
Change-Id: Icae68c1ab1fd0006e00a3a9a56ae8f831d3d0d45
|
|
|
|
| |
Change-Id: Id5fd7180f3a1d62663f79b27ad5108062607596a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See bug 44341 for action=parse, but the problem with interwiki
processing can also be happen in other modules.
This gives clearer error message on some modules
For example action=move:
Bad title "*title*"
instead of:
Unknown error: "immobile-target-namespace-iw"
Change-Id: I86524533dfd778a169b39968999918a1f531efeb
|
|
|
|
|
|
|
|
| |
For historical reasons, all our API class had a dummy __construct which
simply calls their parent constructor. This patch removes all such
occurences to save out some bytes.
Change-Id: I667955d7821f780fc5ce23823d74dedb1729b9fa
|
|
|
|
|
|
|
|
|
| |
API was using SVN's version keyword which GIT does not support.
All related methods were either removed, or for those that
could have been used from extensions, emptied out.
api.php?version now shows unrecognized param warning.
Change-Id: I910ca1448ed2ed697ac19b17c486d130aa1d7e03
|
|
|
|
| |
Change-Id: Idd214fa1ad9d05ebb2a79225256fb344a1085e9d
|
|
|
|
|
|
| |
action=block/action=unblock can not have the token required because when
using the gettoken param, the token param can not set.
Change-Id: I15317f16c06f150d29c1b17de76f41a6cfa84820
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Doxygen choke on text enclosed by '<' and '>' since it tries to
interpret them as HTML or XML elements. This patch adds double quotes
in includes/api/*.php files around the two following strings:
<Firstname>.<Lastname>@gmail.com
<Firstname><Lastname>@gmail.com
Which becomes:
"<Firstname>.<Lastname>@gmail.com"
"<Firstname><Lastname>@gmail.com"
Tested locally, it prevents doxygen 1.8.0 related warnings.
Change-Id: I36d82eb3fd4989ee3ffc65b0b527b83711d1ba69
|
|/
|
|
|
|
|
|
|
| |
* Moving setting of empty string to param description.
* Removing word "(optional)" from comment/reason param, because all not
required params are optional.
* Correct description of action=rollback for default comment.
Change-Id: Ifa5b60a7b55b216c43049cd81cb584b2e0518eed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added information about the properties of the results of API calls
to action=paraminfo, including information about "property groups":
what should the prop parameter be set to to get that property.
Uses the same format for types as parameters already do.
The output format of some modules doesn't fit this, so the result
properties for them weren't added, or only partially.
Partially implemented modules:
* expandtemplates:
parsetree is in its own tag
* protect, allusers, backlinks, deletedrevs, info, imageinfo,
logevents, querypage, recentchanges, revisions, searchinfo,
usercontribs, userinfo, users, watchlist, upload:
response with partially complex structure
Not implemented modules:
* feedcontributions, feedwatchlist, opensearch, rds:
non-standard reponse
* help:
error is normal response; not very useful for automated tools anyway
* paraminfo, parse, pageprops, siteinfo, userrights:
response with complex structure
Change-Id: Iff2a9bef79f994e73eef3062b4dd5461bff968ab
|
|
|
|
|
|
|
| |
Undelete reason is a string, it doesn't make sense to use
intval() to change it into an integer.
Change-Id: I76553d6a22305dca8cdc5d676ad60a9b146a0212
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/104445
|
|
|
|
|
|
|
|
| |
It's a parctice that dates back to 2006 when the API was first written, and frankly isn't covered by the coding conventions. Same thing with the docblocks, they're all copypasted with some bits changed and don't even make sense if you look at them in the genereated code docs.
I don't feel that any of us depend on this anymore (get a better IDE), so in the inerest of consistancy it's time we said goodbye to it.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/103273
|
|
|
|
|
|
|
| |
This will probably break something somewhere so when it does please yell at me on IRC and I'll fix it.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/100905
|
|
|
|
|
|
|
| |
protected
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94827
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92398
|
|
|
|
|
|
|
| |
Allow multiple timestamps
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89540
|
|
|
|
|
|
|
| |
Since r88045
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/88416
|
|
|
|
|
|
|
| |
Add since to ApiQueryQueryPage
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/78829
|
|
|
|
|
|
|
| |
outdated (dropped the old one in September '08)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/78827
|
|
|
|
|
|
|
| |
Added a needsToken() function, rather than calling getTokenSalt, which can throw silly errors due to dependencies on parameters
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/74098
|
|
|
|
|
|
|
| |
Add some braces
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/73377
|
|
|
|
|
|
|
|
| |
The UI doesn't use a transaction either, although it seems appropiate.
The begin() should be moved into PageArchive::undelete()
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/72747
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/70647
|
|
|
|
|
|
|
|
|
| |
getPossibleErrors in ApiBase
All but ApiQueryBacklinks
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/70474
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/70462
|
|
|
|
|
|
|
| |
API modules to PARAM_REQUIRED syntax
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/70461
|
|
|
|
|
|
|
| |
59 Temple Place -> 51 Franklin Street
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/68353
|
|
|
|
|
|
|
|
|
|
|
| |
Couple of class comments
Normalisation of "." usage at end of lines (removed)
Normalisation of {prefix}parameter as per bug 23461
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/66232
|
|
|
|
|
|
|
|
| |
* Use an actual value for ApiUpload.php
* Commit some code I must've missed for r64852
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/65010
|
|
|
|
|
|
|
|
|
|
|
| |
Return null in getWatchlistValue if no change
Fixup unneccessary watch/unwatch calls
Remove useless unwatch from ApiUpload
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/64291
|
|
|
|
|
|
|
|
|
| |
Remove the mutually exclusive else checks
Fix undefined on getWatchlistValue in ApiBase
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/64267
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecate old watch/unwatch parameters
Move generic watchlist stuff to ApiBase/getWatchlistValue (maybe needs renaming better?)
Tweak some braces in ApiEditPage
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/64197
|