| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The ApiPageSet doesn't know for sure whether it will be resolving
redirects until it is executed, as the revids parameter may override
that (and it can't easily check before being executed because it might
never actually be executed). So ApiQueryInfo needs to just
unconditionally request page_is_redirect and only consider later whether
to try using it.
Bug: 73464
Change-Id: I2297158188dae5476c5b9b5755ea26cf5b8ae487
|
|
|
|
|
|
|
|
| |
The new field needs to be part of the select to init the title object
correct.
Only needed when $wgPageLanguageUseDB = true
Change-Id: I30e8bb1dd493148cba9fec214718f80d04b7638b
|
|
|
|
|
|
|
| |
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 hitcounter implementation in MediaWiki is flawed
and needs removal. For proper metrics, it is suggested to use
something like Piwik or Google Analytics.
RFC: https://www.mediawiki.org/wiki/Requests_for_comment/Removing_hit_counters_from_MediaWiki_core
Change-Id: I0e5006a7e8a09c800f8fa4effa9399e8afdd7a57
|
|
|
|
| |
Change-Id: If0f62481d059815390b74ccf8167957bc1dbce52
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Only done where globals are config (so not $wgParser, $wgContLang etc)
Change-Id: Ic39cdd858cfb9096a2bc09618f97e64270d76f13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Which type is used depends on the ApiModuleManager responsible for
the API module. There are two managers, one in ApiMain and one in
ApiQuery. Both contain a list of API modules they instantiate.
Both use $this as the first parameter in the constructors of the
individual modules. There is no other regular way to instantiate the
modules, so we know the type must either be ApiMain or ApiQuery.
The lists don't intersect.
I would have prefered the naming scheme $mainModule for ApiMain
modules and $queryModule for ApiQuery modules but since this
doesn't add much I left the shorter variable names untouched.
Change-Id: Ie6bf19150f1c9b619655a06a8e051412665e54db
|
|
|
|
|
|
|
|
|
| |
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I758fa4ad80ac95e2ddd3770bcb9b7d2e57ec34ea
|
|
|
|
|
|
| |
Only used in this class, so make protected.
Change-Id: I20984d14524073b6b1b9f4b31c2107722318503f
|
|
|
|
| |
Change-Id: I56f9632975d53bdfe33ff9412e1a4ba010bdb2aa
|
|
|
|
| |
Change-Id: Iaa1cfaaffc7c55bb7670dfbff3f063cf22434f09
|
|
|
|
|
|
|
|
|
| |
These are needed for OAuth grants.
Note that, even if 'editmywatchlist' is not granted, various actions
will still allow for adding but not removing of pages.
Change-Id: Ie33446a228dd6ed0114730935c1bf65667f5ce01
|
|
|
|
|
|
|
|
| |
This can be useful to determine the language of a page, for example
javascript has english as page language. MediaWiki pages has it page
language corresponding to the lang code in the sub page.
Change-Id: Idd0412574b314ecf52d92243a3f8a08755474663
|
|
|
|
|
|
| |
Fields of page table are shown by default in prop=info
Change-Id: Id8b90c341dea19337558ed355975ab890f0663e2
|
|
|
|
|
|
|
| |
Added spaces before if, foreach
Added some braces for one line statements
Change-Id: Id7779dca4d1185245cf5764102b8de8b232c34b6
|
|
|
|
|
|
|
|
|
|
|
| |
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
|
|
|
|
| |
Change-Id: I1508ed7eb77e5e4f700fb63955d626c4f5915840
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following up I1cb6ee22, which added this information to each page's
action=info, this adds inprop=watchers to query the number of people
watching the page. It is subject to the same limitations (user has
unwatchedpages or watchers >= $wgUnwatchedPageThreshold) as action=info.
Also, update doc for $wgUnwatchedPageThreshold to match reality.
Bug: 44244
Change-Id: Ideaac1d84bbe0349154ffe96ba54d74305e3da1d
|
|
|
|
|
|
|
|
|
|
| |
Added/removed spaces after opening/before closing parentheses
Added a space after a comma
Removed unneeded parentheses in condition
Change-Id: I306091347ccaaf11dee0cdfda3019cb0c12be51b
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
* If a query module has 'continue' parameter, it will auto-report
that it has 'badcontinue' error.
* Added APIQueryBase::DieUsageContinueIf( $condition ) that shows
correct badcontinue error if $condition is true.
Change-Id: I9c48bda6de0cde3c117ad24460bddf6980279633
|
|
|
|
|
|
| |
Fixed spacing, eol chars, "string" --> 'string'
Change-Id: I630247c6c5b469efb67ec9de32e8533ae88e59fb
|
|
|
| |
This reverts commit 0c6ba8c61d73f995d32e5c8348833ebedd90ea4a
|
|
|
|
|
|
|
|
| |
Added inprop=redirecttarget
Refactored ApiPageSet::getRedirectTargets to having one method for
resolving redirect targets and calling that from prop=info.
Change-Id: Ia5fb9f25488880c2dd63e613c913a0864464d327
|
|
|
|
|
|
| |
This tabs are strange and a space there is better
Change-Id: I0885dff575ee2fcd0668d08fef3226e132c5b319
|
|
|
|
| |
Change-Id: I86ee1398abe4a790796d61aba1e1739bc55e565b
|
|
|
|
|
|
|
|
|
|
|
| |
It should be possible to query the notificationtimestamp as a page info
property, rather than only by querying the recent changes for the
watchlist. It should also be possible to clear or adjust the
notificationtimestamp via the API.
This patch does just that.
Change-Id: I8e2c0769e93802a6a09936899a41c07f9c4c9f25
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
prop=info shows only old protection from page.page_restrictions, if a
new protection in table page_restrictions was found, because only in the
foreach was the old protection checked, but that foreach operated
on pages, which was found in table page_restrictions. Doing an extra
foreach over the array of old protection fix this.
This change also removes the join from the query to table
page_restrictions, because the code already know the needed ns/dbkey.
Change-Id: I52111f30e4fa9550c82d18db33efda5edec59c66
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
| |
\includes\api\ApiPageSet.php on line 111
This came when using action=query&redirects, because ApiQueryInfo was
requesting page_is_redirect unconditionally, but that field is sorted
out, when using resolve redirects
Change-Id: Ifde9c5d8cbbb8775151829ae8c07e3ed5d76868a
|
|
|
|
|
|
|
|
| |
Previously, logging in several times during a phpunit run would change the
session token, but keep the edit token, leasing to "bad token" failures for
all but the first login.
Change-Id: Iad49c990c5661d55cd907b8441addb74eb0ef694
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For missing title the pageid is not set inside the Title objects, but
the pageid is given to that method, so it is better to use that
pageid to check for exist or to use the pageid, instead of using the
Title method.
Change-Id: I07db242eb37731610ac7a83acdb5e6adfc2951aa
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Follow up to I0d6c654a7354ba77e65e338423952a6a78c1150f.
I have also added a URL to a help page on mw.org.
Change-Id: Ie223930cfc313aff150e2dcfd70b74bf4360a8a8
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/113580
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108745
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108743
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/106010
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Fix some context method calls which were considered deprecated
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/101160
|
|
|
|
|
|
|
| |
Deprecated code updates
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/100922
|
|
|
|
|
|
|
| |
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
|