Commit graph

152 commits

Author SHA1 Message Date
Sam Reed
da5268ad6a Fix typo from r89539 2011-06-05 23:28:59 +00:00
Sam Reed
b5b6f83a7e * (bug 29237) add interwiki target url attribute to api/query/interwiki 2011-06-05 22:51:58 +00:00
Sam Reed
f1ece7a090 * (bug 28002) Internal error in ApiFormatRaw::getMimeType
If we just return when no titles, we don't format anything, and everything breaks

Might aswell just unconditionally export, as even with no titles, we still get all the siteinfo and such
2011-06-05 19:22:49 +00:00
Bryan Tong Minh
2cc5f4e972 Kill the error suppression operator in the Api 2011-05-15 14:57:10 +00:00
Roan Kattouw
4a07250372 (bug 28952) Add tofragment to the redirect resolution info.
Changes the format of ApiPageSet::getRedirectTitles() from returning prefixed text strings to returning title objects so we can obtain the fragment info
2011-05-14 12:48:07 +00:00
Sam Reed
e303397d43 Fix daft loading error I added in r88047 2011-05-14 12:00:46 +00:00
Sam Reed
6eb9588bf0 * (bug 28963) add langbacklinks module to api
Completely untested at this point, that's being done next
2011-05-14 11:29:45 +00:00
Sam Reed
2730c42dd8 Whitespace fixes
Addition/tweak of documentation
2011-05-08 21:47:01 +00:00
Happy-melon
2c9cfd7cce Refactor the factory/i18n/list/etc static methods from SpecialPage into their own class; there's no reason we need to be parsing them in every single SpecialPage subclass. Leave all the methods as stubs in SpecialPage.php; if we required PHP 5.3 they could be replaced by a a __callStatic() magic method, but that doesn't work on PHP 5.2.
Also make a few changes to the functions available.  SpecialPageFactory::resolveAlias() now takes an optional subpage and returns array(<name>,<subpage>).  Similarly merge getPage() and getPageByAlias().  There were many examples of (extensions particularly) making dubious assumptions about the presence or absence of subpages or canonical-ness.

I didn't deprecate SpecialPage::getTitleFor() as it's got over six hundred calls.  I'm rather undecided on the best position of getPage()/executePath().  Although the latter needs cleanup anyway.
2011-04-17 11:31:11 +00:00
Sam Reed
fa64025161 More parameter documentation 2011-02-19 00:30:18 +00:00
Bryan Tong Minh
fe8d16bda9 Follow-up r69233: use getDbKey() instead of getText() for special pages. 2011-01-23 20:19:04 +00:00
Sam Reed
135d0998b6 Not sure why I originally used array_key_exists(). Switch for isset() 2011-01-12 01:17:31 +00:00
Sam Reed
981e47d801 Widen api help splitters 2011-01-07 03:04:03 +00:00
Sam Reed
1f05665cf3 Styleli[zs]e the API up to date (Been a while since) 2010-12-30 17:06:09 +00:00
Sam Reed
b3496e5fc9 Another variable type hint, and some function documentation 2010-12-23 20:00:02 +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
1e6add8882 (bug 14869) Add API module for accessing QueryPage-based special pages. Took 2.5 years and a flight to England to get this done, but there you go :) 2010-12-22 20:35:37 +00:00
Neil Kandalgaonkar
59339ca723 Fixed bug#25784 (thumbnails of stashed files had wrong description URLs).
This fixes the more general problem that the imageinfo returned with stashed uploads was inaccurate, since it was relying on
code that only worked with non-stashed files.

So, I had to:
- move the ApiQueryStashImageInfo module into core. Which others had asked for anyway, and was anticipated sometime later.
  - add lines to AutoLoader and ApiQuery to accomodate the new module

- add an ugly if/then to UploadBase -- based on the type of uploaded file, it will use a different API module to simulate a getImageInfo call. 
  I left a TODO that this situation wasn't ideal, but the way things are now, imageInfo is constructed by the API modules, when it should probably
  really be the File modules. Then the API can wrap that info into various formats.

- add a few new lines to the tests to check imageinfo information in both regular and stashed upload files
2010-11-16 06:57:46 +00:00
Sam Reed
563eb117f5 Followup r75641, improve function documentation 2010-11-01 11:57:23 +00:00
Sam Reed
2b81e29ac5 Followup r75554, functionise Export code, allows for return to be used "non scarily"
Remove some extra blank comment lines
2010-10-29 12:20:11 +00:00
Sam Reed
f1335b34bf * (bug 25463) Export header should not be shown if no pages were requested, to reduce confusion
Patch by Umherirrender, with a tweak to inverse logic to reduce nesting
2010-10-27 15:42:32 +00:00
Bryan Tong Minh
3f603335f3 Remove unnecessary @error surpressing operator. $pageSet is always defined and getGoodTitles() always returns an array 2010-10-24 14:56:13 +00:00
Sam Reed
661d26c9a3 Followup r75096 per Platonides, name the stuff better, rather than just fixing the typo.. 2010-10-20 23:36:21 +00:00
Sam Reed
8b03a013a1 Fix some method documentation
Fix some typos

Some explicit class members
2010-10-20 18:50:33 +00:00
Sam Reed
550271e806 Explicit class variable definition
Parameter hints
2010-10-06 21:18:55 +00:00
Roan Kattouw
adf4822d18 Per r74201 CR, make it clear that the list of languages supporting variant conversion may not be complete 2010-10-04 09:11:15 +00:00
Roan Kattouw
4bdf872f0a Per r69587 CR, mention which languages support variant conversion in the API help for the converttitles parameter 2010-10-03 12:11:42 +00:00
Alexandre Emsenhuber
1405fa3c83 Fixed parameter name in documentation 2010-09-19 11:08:09 +00:00
Alexandre Emsenhuber
457eb73b61 Standardised file description headers, added @file 2010-08-07 19:59:42 +00:00
X!
685ef510ee -(bug 24484) Add prop=pageprops module
-Add $wgPageProps global variable
2010-08-07 18:50:23 +00:00
Roan Kattouw
075c8d1624 Followup to r69776: cache result of extractRequestParams() because it gets called 2 or 3 times per module per request now. Also touch up documentation here and there 2010-07-23 10:15:29 +00:00
Sam Reed
5387b8a806 Stylize API up to date
Fix spaces from r69755

Minor update to RELEASE-NOTES per r69753
2010-07-23 07:33:40 +00:00
Tim Starling
b2dc451c82 Rewrote r69339 etc. to clean up API cache header handling.
* Introduced a "cache mode" concept to simplify the header generation code, and to avoid odd results when conflicting cache header requests are received from submodules, or at least to formalise the handling of such cases.
* Made the cache mode private by default, so that code written in ignorance of caching tends to be safe. If different query modules are used in a single request, private caching is preferred over public caching.
* Removed the "must-revalidate" option from all CC headers, this is really specific to page views with a hacked squid in front, I don't think it's applicable here.
* Made the watchlist module private. This is really the definition of private data. There's nothing in the HTTP spec that says the URL for a CC:public request is private and can't be leaked. CC:private provides protection against unknown proxy behaviour.
* In ApiQueryAllmessages: avoid calling $wgLang->getCode() to check if it's necessary to make a new $wgLang when lang= is specified, since this is the only thing that unstubs $wgUser.
* Removed "FIXME: should this check $user instead of $wgUser?" Answer is no.
2010-07-23 07:17:56 +00:00
Sam Reed
3cb1d23890 Remove various unused parameters
Only comment them out in ApiFormatYaml_spyc.php
2010-07-22 21:55:40 +00:00
Bryan Tong Minh
1d2b69a414 Follow-up r69233: Add existence check for NS_MEDIA titles 2010-07-21 14:40:24 +00:00
Roan Kattouw
79efadb25c Coding style: camelCase, not CamelCase 2010-07-21 10:30:02 +00:00
Roan Kattouw
d585f0a045 Followup to r69237: clarify documentation to avoid confusion with title normalization, minor style tweak 2010-07-20 09:24:26 +00:00
Bryan Tong Minh
1162995b21 (bug 24296) Added converttitles parameter to convert titles to their canonical language variant. 2010-07-10 11:53:22 +00:00
Bryan Tong Minh
3f3465126a (bug 24185) Titles in the Media and Special namespace are now supported for title normalization in action=query. Special pages have their name resolved to the local alias. 2010-07-10 10:46:20 +00:00
Derk-Jan Hartman
921619b119 Correct the address of the FSF in some of the GPL headers
59 Temple Place -> 51 Franklin Street
2010-06-21 13:13:32 +00:00
Sam Reed
411600af87 * (bug 23524) Api Modules as followup to bug 14473 (Add iwlinks table to track inline interwiki link usage
Addition of IWBacklinks... That should be the bug done
2010-05-25 19:50:20 +00:00
Sam Reed
68ff239ac4 Minor part of bug 23473 - For the top level ApiMain/ApiQuery modules, note that module help is available before
Minor comment tweak to ApiQueryIWLinks
2010-05-15 11:07:31 +00:00
Sam Reed
5b5bf3ba53 Part 1 of Bug 23524 - Api Modules as followup to bug 14473 (Add iwlinks table to track inline interwiki link usage)
Addition of ApiQueryIWLinks (prop=iwlinks)
2010-05-14 20:54:55 +00:00
Sam Reed
b9c3930bb5 metadata is one word... 2010-05-14 11:25:41 +00:00
Sam Reed
e55ed729c4 Mixture of things.
Couple of class comments

Normalisation of "." usage at end of lines (removed)

Normalisation of {prefix}parameter as per bug 23461
2010-05-11 22:30:18 +00:00
Sam Reed
e4eca2c65e * (bug 21346) Make deleted images searchable by hash
Based roughly on ApiQueryAllimages
2010-05-10 22:41:16 +00:00
Sam Reed
ff442ae79f * (bug 19721) API action=help should have a way to just list for a specific module 2010-05-08 11:45:41 +00:00
Jack Phoenix
96b4f302af API: fix copyright symbol, coding style cleanup, more braces 2010-02-24 13:34:11 +00:00
Sam Reed
1f9a7d791c Implement 9 modules dieUsage errors 2010-02-13 00:48:31 +00:00
Mark A. Hershberger
8b36a2b969 various eol whitespace now instead of when someone needs to do CR 2010-02-12 06:44:16 +00:00