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
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
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
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
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
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
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
* 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
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
Try falling back to use the printer without any of its parameters in
case one of them is what's failing.
Change-Id: I2611550109de4219bf1cc43333d038753e9eb87c
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
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