Commit graph

172 commits

Author SHA1 Message Date
Sam Reed
e1d83d5721 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 18:01:54 +00:00
Sam Reed
138ddc452f Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 17:42:35 +00:00
Sam Reed
f9aac8d3ba Related to bug 33223
Update static list of languages that support variants
2011-12-30 22:44:07 +00:00
Robin Pepermans
be2de16942 update all core usage of deprecated Title::userCanRead() 2011-12-13 11:05:30 +00:00
Sam Reed
2fc7279345 * (bug 32688) Paraminfo for parameter "generator" of the query module shows too many types
Pass prop and list through the generator filtering in the constructor
2011-11-28 20:35:32 +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
Aaron Schulz
6c4360c951 Make use of Title::isSpecialPage() in various places 2011-11-02 20:55:08 +00:00
Sam Reed
1ba364df99 Update documentation
Fix some context method calls which were considered deprecated
2011-10-28 18:10:41 +00:00
Sam Reed
d8957aca62 Refactor variables to give somewhat useful names 2011-09-16 18:28:24 +00:00
Sam Reed
478a95fb13 Give a list of modules to query and action into paraminfo 2011-09-16 18:11:47 +00:00
Roan Kattouw
d8a2733757 Make the PROTO_ parameter to wfExpandUrl() explicit in all calls. There are now no calls to wfExpandUrl() in core that rely on PROTO_CURRENT being the default. Also switch to using getCanonicalUrl() for.... rel="canonical" :D (I picked the right name, I KNEW IT) 2011-08-19 15:46:08 +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
Roan Kattouw
fbdba8b26f Revert r93802 per CR. Will avoid cache pollution by splitting the cache instead 2011-08-03 07:54:23 +00:00
Roan Kattouw
541aa4cbdd Followup r92044: force HTTP on URLs output by the API, now that wfExpandUrl() has a flag for this 2011-08-03 07:05:21 +00:00
Sam Reed
ac0ff8fb37 Followup r92396 rename method, fix boolean comparison that was supposed to be inverted when de-indenting 2011-07-17 16:23:29 +00:00
Sam Reed
d18c0dc315 * (bug 28817) Add reference help page link to API Modules
Start of this bug, fleshed out base code implemented, plus a few key modules (will finish rest up soon)

Tweaked/improved/updated some documentation as I went through also
2011-07-17 16:18:09 +00:00
Roan Kattouw
7b8b23e8b4 Per wikitech-l, run a bunch of URLs in the API output through wfExpandUrl(), so they become fully-qualified even if they were originally protocol-relative 2011-07-13 01:27:07 +00:00
Sam Reed
8edf4a2d92 Fix trailing whitespace
Swap methods that call $this->getResult() to use temporary variable
2011-06-29 23:46:39 +00:00
Sam Reed
536a49efd7 Followup r89539, per CR, we don't need to append iw string as it already exists in rawTitleStr 2011-06-17 15:24:40 +00:00
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