Commit graph

3702 commits

Author SHA1 Message Date
RobinHood70
15ecc5a93a Update getHelpUrls() for reworked mw.org API pages
Community members restructured the mediawiki.org API pages, e.g.
the meta allmessages query submodule is no longer in the catch-all
https://www.mediawiki.org/wiki/API:Meta?oldid=1408361#allmessages_.2F_am
but its own https://www.mediawiki.org/wiki/API:Allmessages

The links in the generated API help, e.g.
https://www.mediawiki.org/wiki/Special:ApiHelp/query+allmessages,  are no
correct. They're not 404s but they don't take you directly to the
relevant page.

This patch set fixes the getHelpUrls() URLs (and does nothing else).
I tested them all.

Thanks RobinHood70!

Change-Id: Icea94abdd22d1ad468172642a21641e7c5ce2046
2015-05-04 08:15:54 +00:00
Translation updater bot
deab9b834e Localisation updates from https://translatewiki.net.
Change-Id: Ie5b88f7a118de5f7811df486635111531b199b77
2015-05-03 21:15:48 +02:00
Translation updater bot
cb4cab68af Localisation updates from https://translatewiki.net.
Change-Id: I6d47a79e8418d6ddbfdb501a1cd82ff680ebd851
2015-05-02 21:39:41 +02:00
Translation updater bot
7de320ebe5 Localisation updates from https://translatewiki.net.
Change-Id: I3a92cfdcbf771a4aa30389ee11b69b9a4f6f8f73
2015-05-01 21:28:31 +02:00
Federico Leva
b880a15b5e Add missing newline in apihelp-upload-description list
Spotted by XZise.

Change-Id: Id317c4e849d937153abc5dabd168fc45847994eb
2015-05-01 13:50:54 +02:00
Translation updater bot
540535c596 Localisation updates from https://translatewiki.net.
Change-Id: I39cb3b69ddb8e81059eedaaeced4f4f2bc44ed66
2015-04-30 21:43:24 +02:00
jenkins-bot
bcc6942690 Merge "Increase parity between api search and on-wiki search" 2015-04-30 17:08:25 +00:00
Erik Bernhardson
87558fc80b Increase parity between api search and on-wiki search
The on wiki search indicates more information than is currently
available by api.  Adds two more props to improve parity:

* categorysnippet: similar to the other snippets, about the category
  that triggered the match
* isfilematch: indicates if the match was part of file content

Additionally when 'suggestion' is included as part of the searchinfo,
'suggestionsnippet' is now also returned.

Change-Id: Ibf18905775a79caed213aca1bdebcffe3644c23b
2015-04-30 08:52:04 -07:00
Brad Jorsch
4bbd86a859 API: Also mangle indexed tag names in format=xml
I had thought no one would be silly enough to set invalid tag names for
ApiResult::setIndexedTagName(), since it's specifically *for* XML tag
names. Apparently I was wrong.

Bug: T97599
Change-Id: I62ad832b1d8c23a275e5c67160f0b1febe5f3454
2015-04-30 09:02:17 -04:00
Marius Hoch
c2675c2e92 Restore B/C for ApiOpenSearch json output if warnings are present
Bug: T97617
Change-Id: Id26f83398c989b7737f52da3f90603ddb533517c
2015-04-30 02:39:55 +02:00
Translation updater bot
f10511033b Localisation updates from https://translatewiki.net.
Change-Id: Id1471f16fb98cde20726e309966761b46e5d978c
2015-04-29 22:06:43 +02:00
Brad Jorsch
ce6e288ee8 API: ApiResult must validate even when using numeric auto-indexes
Bug: T97490
Change-Id: I5301a615a992b090000a59f86e13b9f78dcd5aec
2015-04-29 10:43:45 -04:00
Translation updater bot
8c63286cbd Localisation updates from https://translatewiki.net.
Change-Id: I663235fee22c625f55610a6c53c790a127fbc786
2015-04-28 21:03:25 +02:00
jenkins-bot
4f048178f5 Merge "API: Fix parameter interpretation in ApiFeedRecentChanges" 2015-04-28 04:24:44 +00:00
Translation updater bot
b4b8e10c37 Localisation updates from https://translatewiki.net.
Change-Id: I073cc1399e22fb5c2dd5fc628bebb1cfe02b798d
2015-04-27 21:42:09 +02:00
jenkins-bot
bfdb6eed58 Merge "API: Remove metadata keys from indexpageids output" 2015-04-27 17:54:28 +00:00
Translation updater bot
efe79a9340 Localisation updates from https://translatewiki.net.
Change-Id: Icd09897d70a253338e09ff0eb2e20c4c229a8245
2015-04-26 21:49:26 +02:00
Translation updater bot
89cf404ec4 Localisation updates from https://translatewiki.net.
Change-Id: Ib8aa14e1dec9ee472abc25f38e77600544fd41a3
2015-04-25 22:26:39 +02:00
Brad Jorsch
94956a33e8 API: Fix parameter interpretation in ApiFeedRecentChanges
ApiFeedRecentChanges uses special page logic (eew) to do its thing.
Lacking the time at the moment to refactor the business logic, let's at
least pass the parsed parameters in via a FauxRequest instead of
allowing the special page logic to do its own interpretation of the raw
parameters.

This makes it so all recognized timestamp formats are supported (instead
of only TS_MW) and fixes the interpretation of booleans to match API
standards.

Bug: T97213
Change-Id: Ia254e36b5df2e552e283fb57ce859d6478908bd9
2015-04-25 07:23:51 -04:00
jenkins-bot
ebdc994266 Merge "ApiEditPage: Fetch content model from article, not title" 2015-04-25 03:40:46 +00:00
jenkins-bot
00fa178088 Merge "API: Improve queries for prop=revisions in enum mode" 2015-04-24 23:00:58 +00:00
Brad Jorsch
ac02f17a9f API: Improve queries for prop=revisions in enum mode
This reworks the queries to better use the indexes available, and at the
same time sorts results by rev_timestamp like they always should have
been rather than rev_id. See T88084 for details.

This also takes the opportunity to replace !is_null with !== null, since
it was annoying me while writing this.

Bug: T88084
Bug: T91883
Change-Id: Ie175c6014e75848e9dda6b413175c8575d1ef6af
2015-04-24 15:49:59 -07:00
Translation updater bot
f67927223a Localisation updates from https://translatewiki.net.
Change-Id: I6732d53f845fda7bebd133a094cbd27578532504
2015-04-25 00:23:10 +02:00
jenkins-bot
9e18610457 Merge "Better pageprops API example" 2015-04-24 13:43:59 +00:00
S Page
3cdc12c609 Better pageprops API example
Change example query from non-existent Category:Foo to querying Main
Page and MediaWiki, which exist on both enwiki and mediawiki.org (and
have really interesting info on enwiki).

To test, visit api.php?action=help&modules=query+pageprops and try the
example URL.

Change-Id: Ibad1e912bd2fa0f0f627025a60ec137f43a2abe4
2015-04-23 18:40:33 -07:00
Translation updater bot
f33c72214a Localisation updates from https://translatewiki.net.
Change-Id: I6bcecb1d8d1d57b20c583ec65267a72f6b4b6a1d
2015-04-23 23:09:49 +02:00
Brad Jorsch
480e8cceb1 ApiEditPage: Fetch content model from article, not title
The Title object's cached content model isn't updated after the edit.
The Article object fetches the model from the revision that was just
created, so let's just use that instead.

Bug: T96937
Change-Id: I4c5ab3ec6829d403a29a8a8f55e7458730369034
2015-04-23 10:23:41 -04:00
Brad Jorsch
1de341dbf9 API: Remove metadata keys from indexpageids output
While we could fix the issue at hand by moving the setArrayType() call,
it's more robust to explicitly remove *all* metadata.

Bug: T96942
Change-Id: I313b19339474ea34880ebef31851eefdf14a7a07
2015-04-23 09:17:56 -04:00
Purodha
584d47117e API message text clarification.
Change-Id: I5d3e287f034bdd20f7f2d3893705af2d989e7d59
2015-04-23 11:52:11 +00:00
jenkins-bot
c1e195d320 Merge "Moved ActiveUsers updates to recent changes jobs" 2015-04-22 20:19:25 +00:00
jenkins-bot
6b4ef9e7c6 Merge "Make import destination UI more intuitive and clearer" 2015-04-22 20:01:14 +00:00
Translation updater bot
b52d031261 Localisation updates from https://translatewiki.net.
Change-Id: I5643c2c93bc5c0546a543dca06c393ddc50944c9
2015-04-22 21:25:38 +02:00
Aaron Schulz
d834197821 Moved ActiveUsers updates to recent changes jobs
* This avoids writes on view and is more reliable
* Also made the wfWaitForSlaves() there actually work

Bug: T95501
Bug: T92357
Bug: T89027
Change-Id: I0a006fc92a9268feb185c9d88aa04002ea51ecd3
2015-04-22 19:13:37 +00:00
This, that and the other
1fe98feab0 Make import destination UI more intuitive and clearer
Previously there were two fields: Destination namespace, and Destination
root page. They were both optional, and the "root page" one in particular
was a bit mysterious until you tried it out. In addition, there was a
strange interaction when you set both fields (I still don't quite
understand what used to happen in this case).

Now, there is a set of three clearly described radio buttons, allowing the
user to select whether to import pages into their automatically chosen
locations, into a single namespace, or as subpages of a given page. These
correspond to the three ImportTitleFactory classes available in MediaWiki.

See https://phabricator.wikimedia.org/M28 for a screenshot.

The logic of WikiImporter#setTargetNamespace is tweaked slightly to remove
the interaction between target namespace and target root page, since only
one of these options can now be set. Similarly, the API's import module
is modified in the same way.

Bug: T17908
Change-Id: I11521260a88a7f4a95fbdb71ac50bcf7b4fe5cd1
2015-04-22 18:46:40 +00:00
jenkins-bot
f34b83ef67 Merge "API: Add wfDeprecated() to deprecated ApiResult methods" 2015-04-21 20:39:15 +00:00
jenkins-bot
54e68b4c35 Merge "API: Better handle UsageException from the printer itself" 2015-04-21 20:28:13 +00:00
Translation updater bot
cbee81e4a3 Localisation updates from https://translatewiki.net.
Change-Id: I0bf5ec58a5a631ad19b07543a68d0c6b91c4012f
2015-04-21 21:42:52 +02:00
Brad Jorsch
f9c7383de9 API: Better handle UsageException from the printer itself
Try falling back to use the printer without any of its parameters in
case one of them is what's failing.

Change-Id: I2611550109de4219bf1cc43333d038753e9eb87c
2015-04-21 10:03:50 -04:00
Brad Jorsch
beab6b009e Change API result data structure to be cleaner in new formats
Nothing in this patch should result in changed output for format=json or
format=php except as noted in RELEASE-NOTES-1.25, and changed output for
format=xml should be similar or cosmetic. However, other code accessing
the result data directly may need to be updated.

Bug: T87053
Bug: T12887
Change-Id: I3500708965cb8869b5aed1543381aad208dadd13
2015-04-20 17:49:37 -04:00
Brad Jorsch
0c86649f4b API: Add wfDeprecated() to deprecated ApiResult methods
Bug: T96596
Change-Id: Ib0068b4cd3cc9c1765d82a8ade7b3d435c57f1d5
2015-04-20 16:20:24 -04:00
Translation updater bot
01b0a29db9 Localisation updates from https://translatewiki.net.
Change-Id: Ia6de439d0d02dd9ed3c8426472d6d7abbdb61c76
2015-04-20 21:42:17 +02:00
jenkins-bot
9d7bbe624c Merge "Add supportsDirectEditing methods to ContentHandler" 2015-04-20 16:29:01 +00:00
jenkins-bot
c9efc4ec9b Merge "ApiFormatPhp: Fix dieUsage call on unknown formatversion value" 2015-04-20 15:14:07 +00:00
Kunal Mehta
fec5b83d7e ApiFormatPhp: Fix dieUsage call on unknown formatversion value
Same as Ib6cee829b589

Change-Id: Ib695520b620e57dba342d984856e58adeaeb4ca8
2015-04-20 08:04:01 -07:00
Kunal Mehta
1c234274d7 ApiFormatJson: Fix dieUsage call on unknown formatversion value
* Add missing error code
* Don't call staticly, it's not a static function

Change-Id: Ib6cee829b589f6fe0d092ebe7cca2a1d16c357fd
2015-04-20 14:57:45 +00:00
Brad Jorsch
db6a9636f1 API: Avoid warnings for parameters that don't exist in format=rawfm
As format=rawfm is intended for debugging, a recent change removed
definition of unnecessary parameters inherited from format=json. But the
inherited code was still assuming they were defined, causing PHP
warnings.

Bug: T96479
Change-Id: Id13ae541f13b6930c535d156dc5aac0a257d31e8
2015-04-20 10:16:03 -04:00
Translation updater bot
3b63f289e6 Localisation updates from https://translatewiki.net.
Change-Id: Id0523c7c8ced2bd9ce455c04d3bcd1515e76797b
2015-04-19 20:57:54 +02:00
Translation updater bot
ee19a69335 Localisation updates from https://translatewiki.net.
Change-Id: Ic5f208a41d986cf2ccd75af1eb2f4f90dcbeedd1
2015-04-18 23:55:54 +02:00
jenkins-bot
1743e4831d Merge "Follow-up 1c57794e37: change 'nobools' to 'nobool' in docs" 2015-04-17 23:38:59 +00:00
Roan Kattouw
8a844cafd6 Follow-up 1c57794e37: change 'nobools' to 'nobool' in docs
Because 'nobool' is what's actually used in the code.

Change-Id: Ia846e6abbf973d3b060a509e0216023a8278d7f6
2015-04-17 16:29:43 -07:00