Commit graph

157 commits

Author SHA1 Message Date
Brad Jorsch
5dc1a63f20 (bug 30836) API siteinfo specialpagealiases should not return nonexistent special pages
Some special pages are conditionally registered (e.g.
Special:Popularpages only exists when $wgDisableCounters is false), or
sometimes an alias exists for a special page that does not. The API
should probably not return entries for these from
meta=siteinfo&siprop=specialpagealiases.

This also fixes bug 38464 correctly, rather than blindly reverting.

Change-Id: Ic021a47754ea7a1574e818dad47151ab6698e06f
2012-07-18 23:09:13 -04:00
Aaron Schulz
e6faa2fd76 Merge "escape HTML elements in docblock with double quotes" 2012-07-18 19:17:46 +00:00
Reedy
39080a18dd Revert "(bug 30836) API siteinfo specialpagealiases should not return nonexistent special pages"
Caused Bug 38464 - API showing internal error with ?action=query&meta=siteinfo&siprop=specialpagealiases&format=xmlfm

This reverts commit 48523016ef

Change-Id: I470e87d21d98d4436bd5e27d0a3796559f9c41bb
2012-07-18 17:50:09 +01:00
Antoine Musso
4f5d2386f3 escape HTML elements in docblock with double quotes
Doxygen choke on text enclosed by '<' and '>' since it tries to
interpret them as HTML or XML elements. This patch adds double quotes
in includes/api/*.php files around the two following strings:

 <Firstname>.<Lastname>@gmail.com
 <Firstname><Lastname>@gmail.com

Which becomes:

 "<Firstname>.<Lastname>@gmail.com"
 "<Firstname><Lastname>@gmail.com"

Tested locally, it prevents doxygen 1.8.0 related warnings.

Change-Id: I36d82eb3fd4989ee3ffc65b0b527b83711d1ba69
2012-07-15 22:15:45 +02:00
Brad Jorsch
48523016ef (bug 30836) API siteinfo specialpagealiases should not return nonexistent special pages
Some special pages are conditionally registered (e.g.
Special:Popularpages only exists when $wgDisableCounters is false), or
sometimes an alias exists for a special page that does not. The API
should probably not return entries for these from
meta=siteinfo&siprop=specialpagealiases.

Change-Id: I59eb82eae45fb47c6a769195cc1bd28711b4fcac
2012-07-07 02:40:35 +04:00
Brad Jorsch
68597a1345 Allow API meta=siteinfo to return list of know variable IDs
To know whether something like {{foo}} is a template, variable, or
function, you have to first check if it's a magic word, and then look up
the magic word ID in the list of variables and the list of function
hooks. The API already can return the list of known magic word mappings
(siprop=magicwords) and function hooks (siprop=functionhooks), this
completes the set by allowing siprop=variables.

Change-Id: If13df9c3796ea6815393d847a3c6f70380bba58a
2012-07-05 02:03:50 +01:00
Max Semenik
dd6519709b Bug 36453 - Provide the git info on action=query&meta=siteinfo
Change-Id: I3d6c79d0d2cafd533f39e255940869087778d884
2012-06-30 00:04:42 +04:00
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