Aaron Schulz
fdb74872a8
Merge "multi dbms support in api"
2012-05-20 18:15:42 +00:00
umherirrender
278bb4414f
multi dbms support in api
...
Add some calls to Database::timestamp
Change some calls from Database::strencode to
Database::addQuotes to avoid ' in raw sql
Remove ' from ints in raw sql
Rename some vars to avoid duplicate names
Change-Id: I63f5602fa968f969a42932902a3ccc45fc54b432
2012-05-16 19:22:36 +02:00
Petr Onderka
7264a75515
Fixed typo in description in categorymembers module
...
Change-Id: I7d82df6a4b0f65fe763e0eea23dfa05ae2e7c5f1
2012-05-10 20:36:34 +02:00
Alexandre Emsenhuber
18cc220038
Don't make two database requests to load the same object, again.
...
I know there's no second parameter to WikiPage::newFromID(), but this will change soon.
This follows-up I098dd36619fff3610be6894037220d3472b809d5.
Change-Id: Ic28b7e05db51e55a5f49fed70c042ba11e4d97fe
2012-05-04 22:10:36 +02:00
umherirrender
e0ded894d9
(bug 30488) API now allows listing of backlinks/embeddedin/imageusage
...
per pageid
Move the possibles errors set by ApiBase::getTitleOrPageId to
ApiBase::getTitleOrPageIdErrorMessages and remove it from used modules
Change-Id: If037e04665d2524c1f2476bc7996d9573753a4b8
2012-05-02 01:35:04 +01:00
Reedy
b9e6daa3aa
Simplify and refactor out api code for getting title or page id
...
Change-Id: I098dd36619fff3610be6894037220d3472b809d5
2012-04-27 15:58:04 +01:00
Reedy
9081f7e6d0
Normalise categorymembers to take ascending/descending for direction, also adding newer/older to make it like other modules
...
Change-Id: I50c770b8d48548988a71bcf62b76a9c43fc1622f
2012-04-10 14:02:22 +01:00
Aaron Schulz
5a6559d8b1
Reverted r108743 per CR comment. This should at least be discussed first.
2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b
Kill "* @return void"
2012-01-12 19:12:24 +00:00
Sam Reed
6115b93df8
Re-instate most of the revisions for bug 33147 "API examples should explain what they do"
...
Using this to sync up my working copies
Should have the little niggles tidied up though
2011-12-27 16:22:35 +00:00
Brion Vibber
ad0d48d6bc
Revert r106439, r106441 - bad formatting mushing separate lines together
2011-12-20 22:11:29 +00:00
Sam Reed
1b46e91efd
Convert a few more descriptions
...
Ping r106439
2011-12-16 15:45:16 +00:00
Sam Reed
53000baecf
Oh noes, moar http:// -> https://
2011-11-28 15:43:11 +00:00
John Du Hart
2e7d867478
Removed the 'eclipse helper' bit on top of every API module
...
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.
2011-11-16 00:17:26 +00:00
Sam Reed
2f23e71490
arrray -> array
...
Whitespace
Other documentation improvements
Comment out some unused code (which has a fixme left with it already)
2011-11-01 23:48:09 +00:00
Roan Kattouw
3a392d1ccf
Introduce cmstartsortkeyprefix and cmendsortkeyprefix parameters so categorized pages can be looked up using a category+sortkey combination. Based on a feature request from Danny B on IRC
2011-10-30 18:49:26 +00:00
Roan Kattouw
0755cf92a1
Fix bug in r83814 reported on IRC: categorymembers did not set an ORDER BY when cmcontinue was set, which broke paging when cmdir=desc was used.
2011-10-05 13:15:44 +00:00
Sam Reed
a5628f5734
Based on diff to wikia, set more functions consistently public rather than protected
2011-08-17 22:24:21 +00:00
Sam Reed
9c37ab4fb3
* (bug 28817) Add reference help page link to API Modules
...
Last followup of r92396
Should be all modules with documentation pages in core now documented...
2011-07-17 17:02:06 +00:00
Sam Reed
25ea9b8d95
Replace more multiple calls to $this->getResult() in methods with temporary variable
2011-06-30 01:06:17 +00:00
Roan Kattouw
dd67a0917b
API: Clarify help text for cmstartsortkey and cmendsortkey parameters
2011-04-19 15:46:05 +00:00
Roan Kattouw
8cc843f25c
API: BREAKING CHANGE: (bug 28541) Output of binary ICU sortkeys is broken. Change sortkey fields in prop=categories and list=categorymembers to hexadecimal strings, that way we don't have any issues with scary binary stuff. Also change cmcontinue to take hex-encoded sortkeys and swap the order back to normal (previously sortkey was at the end because it could contain pipe characters, but that's not an issue with hex).
2011-04-17 12:41:29 +00:00
Roan Kattouw
f212ddabae
BREAKING CHANGE: Ignore cmtype when cmsort=timestamp is set, and bypass the per-type queries in the sort=timestamp case; they were causing performance problems, reported as bug 28291. This breaks backwards compatibility (gracefully, the cltype parameter is silently ignored) with earlier deployed versions of 1.17wmf1 but not with any released version, hence no RELEASE-NOTES
2011-03-28 15:01:20 +00:00
Roan Kattouw
a6c758a39a
Per r83812 CR, solve the categorymembers paging problem by doing separate queries for each value of cl_type, with some trickery to make paging work. This makes the enum->varchar schema change for cl_type unnecessary, so I'll revert that.
...
Code was largely copied from Tim's CR comment on r83812 but adapted to deal with the fact that we have to apply the cmcontinue-induced WHERE on cl_sortkey and cl_from only for the first query. Because ApiQueryBase doesn't let us unset or overwrite conditions like these in a nice way, I added an $extraQuery parameter to ApiQueryBase::select() that excepts additional query parameters that are only applied to that query but not stored in the object.
2011-03-20 16:25:01 +00:00
Sam Reed
3e725a90b8
Revert r83993
2011-03-16 00:13:10 +00:00
Marcin Cieślak
274d317a0c
r83812, r83814: Don't use cl_type at all when paging categorylinks
...
* Remove cl_type from paging in categorylinks - it's not
really needed there. Although cl_type is in WHERE but not
in ORDER BY clause the worst thing that can happen
is to have a filesort going again through <500 entries
selected by index. Or will FORCE INDEX work anyway?
* Revert schema change, as we don't need cl_type there
anyway (or even if we wanted to compare, it should
work as expected by using INT values against ENUM).
2011-03-15 02:53:00 +00:00
Sam Reed
ec65ff0c11
Fixup a couple more hardcoded module prefixes in help
2011-03-13 17:28:53 +00:00
Sam Reed
92cad959dc
Minor followup to r83814, also fix some other existances
...
Don't hardcode module prefixes (just incase they're subclassed at somepoint... :) )
2011-03-13 17:26:29 +00:00
Roan Kattouw
64d9832d1f
(bug 27965) Paging in list=categorymembers was completely broken. It was paging by cl_from alone, while the index is on (cl_to, cl_type, cl_sortkey, cl_from) and only cl_to is constant. Fixed by paging on (type, sortkey, from), but using type|from|sortkey for clcontinue so any pipe characters in the sortkey are easier to handle. This needs the schema change in r83812 to work correctly, otherwise rows with cl_type=file will be skipped in certain cases.
2011-03-13 10:39:57 +00:00
Sam Reed
f483892c90
* (bug 27717) API's exturlusage module does not respect $wgMiserMode
...
Implement ApiQueryCategoryMembers style miser mode stuffs
2011-03-06 19:15:07 +00:00
Sam Reed
41e7860130
Implement getRequireOnlyOneParameterErrorMessages, to make the error messages requireOnlyOneParameter can throw.
...
Use in 4 modules for more dynamicness
2011-02-25 19:09:39 +00:00
Sam Reed
fa64025161
More parameter documentation
2011-02-19 00:30:18 +00:00
Roan Kattouw
e94830540e
Various fixes for API category changes:
...
* Followup r80326: clarify description of type property
* Fix r80355: need to use addWhereRange() for the static ORDER BY on cl_type as well, to make sure it flips direction when needed (mixed-direction multi-field ORDER BYs are not indexed)
* Followup r80358: use current not previous value for cl_from, and use >= instead of > . This is the way continues are normally done
* Followup r80362: clarify description for sortkeyprefix property
2011-01-19 00:13:20 +00:00
Sam Reed
44d605d5c3
Fix spaes from r80362
2011-01-15 00:50:48 +00:00
Sam Reed
610c943cd2
Last bits of bug 24650 Fix API to work with categorylinks changes
...
Allow optional output of cl_sortkey_prefix (will anyone needed it, no idea)
2011-01-15 00:10:57 +00:00
Sam Reed
569b833ad2
More for bug 24650. Update continue to be usable unique thing
2011-01-15 00:00:25 +00:00
Sam Reed
4106d51063
Bye bye filesorts. Making order by cl_type, and then addWhereRange adds cl_sortkey, cl_from to this ORDER BY
2011-01-14 23:45:20 +00:00
Sam Reed
bbd8f041a5
Bleh, didn't press save again (r80350)
2011-01-14 23:24:25 +00:00
Sam Reed
82aaf647cb
More query reorganisation, in an attempt to be index friendly
2011-01-14 23:20:42 +00:00
Sam Reed
d89ed3f20b
Fix indenting, rearrange some where statements
2011-01-14 22:37:12 +00:00
Sam Reed
d6c5ef7a5d
Remove ancient comment, collapse if, move USE INDEX into if further down doing the exact same
2011-01-14 21:24:42 +00:00
Sam Reed
cab22980ed
Followup r80324, add type property description
2011-01-14 21:15:12 +00:00
Sam Reed
cd98ba161a
Start of bug 24650 Fix API to work with categorylinks changes
...
Addition of a type field for filtering (default is "all" ie no filter)
Adding of type to props, to allow it to be outputted
2011-01-14 21:08:08 +00:00
Sam Reed
393f9bceb2
Remove one invalid errors, add 2 that could be returned
2011-01-07 02:29:31 +00:00
Sam Reed
5885c02a1a
* (bug 26460) Add support for listing category members by category pageid
2011-01-04 23:59:39 +00:00
Sam Reed
6309c920dd
Delete all the "API for MediaWiki 1.8+" comments
...
Add since to ApiQueryQueryPage
2010-12-22 20:52:06 +00:00
Roan Kattouw
b81ac8ea52
Improve some of the descriptions added in r68482
2010-12-14 11:47:13 +00:00
Alexandre Emsenhuber
457eb73b61
Standardised file description headers, added @file
2010-08-07 19:59:42 +00:00
Sam Reed
dc360b4cef
Change statsOutput to parent, wikiStatsOutput is a subclass of statsOutput
2010-08-06 14:12:41 +00:00
Sam Reed
6c2abce867
Make search enforced by API in search by setting PARAM_REQUIRED
...
Same for ApiQueryCategoryMembers and ApiWatch title params
More followup to r70461
2010-08-04 20:47:58 +00:00