Commit graph

150 commits

Author SHA1 Message Date
umherirrender
e9fa97f76e Add unit test for MWNamespace::isNonincludable
rename MWNamespace::isNonincludableNamespace
to MWNamespace::isNonincludable, because "Namespace" is already in the
class name

Change-Id: Ie982835c7dc84cb10c823996e5360cc1b342f704
2012-05-11 19:52:34 +02:00
umherirrender
ffa3486aa8 (bug 33224) add variants of content language to meta=siteinfo
Change-Id: I0b92e1e626f0c5bc543c5d134eb44d7ca7722217
2012-05-06 05:13:55 +02:00
umherirrender
cd40d0040c Add MWNamespace::isNonincludableNamespace
Method is a wrapper around $wgNonincludableNamespaces,
replaced the one place in parser and
add it as info to api's meta=siteinfo

Change-Id: I501b811137c39f5c2d9ea35c78fef8ae22d21bfe
2012-05-05 10:22:28 +02:00
Robin Pepermans
d7a5dd0aaf fix r113403 2012-03-10 02:07:31 +00:00
Robin Pepermans
9184dc83d6 Update core usage of getLanguageName[s]. 2012-03-08 20:56:26 +00:00
Sam Reed
ff322e3e1e * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API. 2012-02-10 14:27:50 +00:00
Robin Pepermans
7bf35ceb8d The URL wasn't loading when the database is used (interwiki cache works). "PHP Notice: Trying to get property of non-object in /www/w/includes/api/ApiQuerySiteinfo.php on line 295"
This reverts r97806. It took me some time to find out, but r96475 accidentally backported the change from $row->iw_url to $row['iw_url'] (etc) to 1.18, which was fixed in r97789. That revision was merged to trunk, which shouldn't have been done either. I.e. until 1.18 it is an object, from 1.19 it is an array.
2011-11-29 16:48:37 +00:00
Sam Reed
53000baecf Oh noes, moar http:// -> https:// 2011-11-28 15:43:11 +00:00
Sam Reed
fcb28f12ea Fix the rest of 'inlanguage ' in r93765 2011-11-17 19:06:30 +00:00
Sam Reed
9157749df6 Fix trailing space in r93765 2011-11-17 19:00:09 +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
bd9136167c Merge r97789 into trunk
Follows up r92528 where this was introduced
2011-09-22 11:04:30 +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
Niklas Laxström
b56b84c5b8 Attempt to fix Bug 30216 - Improve language fallback loop detection.
Made fallbacks a list per language, instead of scanning them recursively through the languages.
2011-08-18 16:41:07 +00:00
Sam Reed
2f8417957a Upstream another minor Wikia change 2011-08-17 22:28: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
Sam Reed
eaf78d51d3 * (bug 18634) Create API to fetch MediaWiki's language fallback tree structure
Patch by "merl"

Tested with pt-br, seems to work fine, listing pt and en for the fallback languages
2011-08-05 13:34:22 +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
7c5f3b57e7 Fix minor naming issue from r93314, add a bit to parameter documentation also 2011-08-02 16:26:15 +00:00
Siebrand Mazeland
aa3ab31250 siprop=interwikimap and siprop=languages can now use silanguagecode to have a best effort language name translation. Use CLDR extension for best result. 2011-07-27 21:16:32 +00:00
Robin Pepermans
844e7c83e4 (bug 19838) API does not use interwiki cache.
Patch by Beau; modified to work with current code.
2011-07-19 12:30:18 +00:00
Sam Reed
d5e46f9614 Followup r92396
More modules documented, pretty much only action=query&list= to be done (ie links added where documentation pages exist already)
2011-07-17 16:51:11 +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
25ea9b8d95 Replace more multiple calls to $this->getResult() in methods with temporary variable 2011-06-30 01:06:17 +00:00
Sam Reed
fe611d4dc6 * (bug 29267) always give the servername for meta=siteinfo&siprop=dbrepllag 2011-06-03 22:59:34 +00:00
Sam Reed
6d7f0c510d Followup r87150
Reuse SpecialVersions arrayToString (made it explicitly public!) in an array_amp for the formatting of arrays/objects (Yay for all the different ways we accept things ;P)
2011-04-30 16:52:28 +00:00
Sam Reed
272a146f46 Followup r87147, let the formatters do teh escaping 2011-04-30 16:38:59 +00:00
Sam Reed
dc0d483992 * Get a list of all subscribed hooks, and those subscribers
Essentially what SpecialVersion will give you if wgSpecialVersionShowHooks is true
2011-04-29 23:33:38 +00:00
Sam Reed
8c30f284a7 * (bug 27179) API: List of extension tags
* Get a list of function hooks through meta=siteinfo
2011-04-29 23:02:10 +00:00
Sam Reed
80f62dd3d9 * (bug 28558) Add iw_api and iw_wikiid to meta=siteinfo&siprop=interwikimap
Waiting on bug 28673 to be merged to core and be used, before this is of any use, but it's done anyway
2011-04-23 11:50:20 +00:00
Sam Reed
3629897c24 * (bug 28672) give information about misermode on api 2011-04-23 11:12:31 +00:00
Sam Reed
e82ca13996 Don't pass $this by reference 2011-03-24 11:11:15 +00:00
Sam Reed
1a951ec9cd Addition of 'APIQuerySiteInfoGeneralInfo' hook for usage in bug 16288 "API: consider making closure status of wikis more clear with meta=siteinfo" 2011-03-20 13:31:22 +00:00
Sam Reed
a52f1eef80 * Expose list of skins in meta=siteinfo 2011-01-23 02:05:26 +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
6309c920dd Delete all the "API for MediaWiki 1.8+" comments
Add since to ApiQueryQueryPage
2010-12-22 20:52:06 +00:00
Bryan Tong Minh
b98f2a5a71 (bug 25174) Add equal sign to boolean parameters in examples, so that the examples work immediately when posted 2010-11-23 22:05:27 +00:00
Sam Reed
bc25b2b427 Tab out siprop, so they are a bit more aligned 2010-11-03 13:00:24 +00:00
Matthew Britton
1e2199b76b reimplement r73652 having actually read coding conventions this time 2010-09-24 14:40:18 +00:00
Matthew Britton
5ea75e4395 API: sinumberingroup now gives correct size of 'user' group, and omits size of implicit groups rather than showing 0. 2010-09-24 13:00:46 +00:00
Alexandre Emsenhuber
457eb73b61 Standardised file description headers, added @file 2010-08-07 19:59:42 +00:00
X!
fdf170e1b7 Followup r70587: Remove unnecessary references 2010-08-07 16:46:57 +00:00
X!
527332491f * (bug 24236) Add add, remove, add-self, remove-self tags to meta=siteinfo&siprop=usergroups 2010-08-06 19:25:34 +00:00
Sam Reed
ddc7efbedf stylize api up to date 2010-08-05 07:02:09 +00:00
Sam Reed
ace7e5b87a Resolve minor fixme from r69761 2010-07-23 15:58:32 +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
8f1d2cb199 Big blitz on unused variables (a lot of $db = $this->getDb() ) 2010-07-22 22:13:21 +00:00
Tim Starling
42017a2f47 Use $wgContLang not $wgLang for checkTitleEncoding() and getSpecialPageAliases(), it doesn't make sense to use the user language, WebRequest and SpecialPage certainly don't. The DatabaseOracle use of checkTitleEncoding() is weird and probably broken, but at least it uses the right object now. 2010-07-22 04:00:39 +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