Commit graph

51 commits

Author SHA1 Message Date
Liangent
69ebd8d7ce Add some more detailed info about the xslt param of format=xml
Change-Id: I77e1dcbdf3ff1d201a2346c5a397469b4fc21d74
2012-05-25 08:56:02 -07:00
Jeroen De Dauw
4544a78316 rem use of escapeLocalURL 2011-12-13 04:58:48 +00:00
Sam Reed
124f6229ac Followup r104445, swap the xmlnamespace url back to http:// 2011-11-28 20:04:40 +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
Brion Vibber
c9873a9230 Partial revert of r101912 -- restores r99315 'includexmlnamespace' parameter for API, but keeps the logic to keep that from clobbering alternate XML output formats with their own namespaces. 2011-11-04 01:31:15 +00:00
Brion Vibber
abb23bb7b9 * (bug 31878, bug 31542) Fix XML namespace output in API; removed now-unneeded includexmlnamespace parameter.
Any existing uses of includexmlnamespace should be ignored and harmless.

If output data already includes a specific default namespace as an xmlns attribute, it is now retained -- so for example the RSD API discovery module outputs the appropriate namespace instead of the generic API one.

Partial revert of r99135 which added the includexmlnamespace parameter as a temporary requirement to get the xmlns attribute included.

Followup to r88007 which added the xmlns originally, but in the wrong order so it overrode existing output data.
2011-11-03 23:14:58 +00:00
Mark A. Hershberger
03e69126c5 eol w/s 2011-11-03 21:22:34 +00:00
Bryan Tong Minh
504d37d6fc (bug 24781) The API will include an XML namespace if the includexmlnamespace parameter is set.
Partial revert of r88007, which adds the namespace unconditionally, since it breaks stuff as per the bug discussion.
2011-10-06 20:11:44 +00:00
Sam Reed
4065e65d03 Even more documentation in various files 2011-05-29 14:24:27 +00:00
Roan Kattouw
abaa9ae3f3 (bug 24781) Define XML namespace for API output. Also created the referenced URL on the cluster. 2011-05-13 16:34:36 +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
Sam Reed
ee40f73227 Remove some unused keys from foreach
Documentation tweaks
2010-09-25 16:56:03 +00:00
Alexandre Emsenhuber
457eb73b61 Standardised file description headers, added @file 2010-08-07 19:59:42 +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
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
Jack Phoenix
c286869e38 API: fix copyright symbol, coding style cleanup, more braces 2010-02-23 18:05:46 +00:00
Sam Reed
d2d950d256 Start of blanket coverage of dieUsageMsg in getPossibleErrors
Only basic ones done.

Couple of other modules done manually
2010-02-13 00:09:05 +00:00
Bryan Tong Minh
843acd3aab (bug 19528) Revert 55749: "according to the XSLT 1.0 spec, the MIME type should be text/xml or application/xml. In XSLT 2.0, it is application/xslt+xml. Either way, text/xsl is wrong." The mime type text/xsl is the only one supported by all modern browsers. 2010-01-23 15:27:53 +00:00
Aryeh Gregor
3758769f0d stylize.php on API code
"I wouldn't object to stylizing the API code to bring it in line with
the rest of MW on principle, but I'm not gonna bother myself." --Roan
<http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60657#c5108>

If you're seeing this commit in blames, tell your blame tool to ignore
whitespace, e.g., git blame -w or svn blame -x -w.
2010-01-11 15:55:52 +00:00
Brion Vibber
ecf95fd877 Cleanup for r55641: call static function statically 2009-09-08 23:54:03 +00:00
Tim Starling
f4d32ce48b Fix for r53194: according to the XSLT 1.0 spec, the MIME type should be text/xml or application/xml. In XSLT 2.0, it is application/xslt+xml. Either way, text/xsl is wrong. 2009-09-02 08:05:47 +00:00
Roan Kattouw
3ac3ccaaf0 API: Refactor the XML formatter a bit so that ApiFormatXml::recXmlPrint() is now actually usable as a generic XML formatter 2009-08-27 21:15:20 +00:00
Bryan Tong Minh
e94bc9516d (bug 19528) Added XSLT parameter to API queries in format=xml 2009-07-13 21:37:49 +00:00
Roan Kattouw
a4d055587e API: (bug 18617) Add xml:space="preserve" attribute to relevant tags in XML output so overzealous XML parsers will leave whitespace in e.g. revision content alone 2009-04-29 13:12:27 +00:00
Roan Kattouw
bb81750f27 * API: (bug 17326) BREAKING CHANGE: Changing output format for prop=imageinfo&iiprop=metadata to something based on name/value pairs. This means we don't use parts of the metadata in attributes anymore, something that caused invalid XML to be output. For more info on the exact format, see the mediawiki-api mailing list
* Removed the spaces-to-underscores hack in the XML formatter
2009-02-03 16:25:50 +00:00
Chad Horohoe
be374a912a War on wfElement() and friends. Call the Xml members directly, rather than using old wrappers. 2008-12-14 19:14:21 +00:00
Roan Kattouw
f8dc72921f API: (bug 16105) Image metadata attributes with spaces produce invalid XML. Just replace spaces with underscores in the XML formatter and be done with it. 2008-10-25 15:53:58 +00:00
Tim Starling
f48c6070df Removed all instances of empty() where error suppression was not intended. Replaced with conversion to boolean, count() or empty string check as appropriate. Fixes a number of bugs due to incorrect conversion to boolean: suppressed edit summaries containing '0', ignored titles called '0', searches for '0' ignored, etc. 2008-10-25 14:04:43 +00:00
Roan Kattouw
6a2f8c1193 * (bug 15497) Removed encoding attribute from <?xml ?> tags 2008-09-10 13:39:24 +00:00
Brion Vibber
dae4d46723 Revert r37009 -- turns out you can do these structures, it's just very nonobvious. :)
An anonymous sub-array allows creating sub-elements in addition to the attributes:
array(
    'attrib1' => 'val1',
    'attrib2' => 'val2',
    array(
        'tag' => 'stuff',
        'tag2' => 'stuff2',
    )
)
2008-07-04 22:44:57 +00:00
Brion Vibber
4e4be177e4 Have been playing with custom API modules and been a bit frustrated with the XML output mode...
Adding pseudo-element _attribs alongside _element for XML output. There doesn't seem to be a good way currently to specify both attributes *and* subelements -- '*' lets you have text and attributes, but not sub-elements and attributes. Contents of _attribs will be added as attributes without disturbing the sub-elements.
2008-07-03 21:25:20 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Bryan Tong Minh
3e0efaef14 (bug 11401) Added xmldoublequote to xml formatter 2008-03-03 22:19:03 +00:00
Roan Kattouw
19358606a1 API: Changing all modules' getParamDescription(), getAllowedParams() and getDescription() methods to public. ApiParamInfo needs them, and some versions of PHP threw fatal errors because they were protected. Oddly, other versions didn't (maybe because the caller and the callee have a common ancestor?) 2008-01-28 19:05:26 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Yuri Astrakhan
cb38c11c84 API: documentation and cleanup. 2007-05-20 23:31:44 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Yuri Astrakhan
ed43f714f4 API * better self-description for various modules
* namespace type for parameters
* fixed bug with incorrect ordering in paging
* fixed bug with revisions and watchlist paging
2006-11-03 06:53:47 +00:00
Yuri Astrakhan
f928f9a6cd API * Better log events info * Added RAW debugging format 2006-10-17 02:01:20 +00:00
Yuri Astrakhan
262435b9f8 * API: help screen now shows default and allowed parameter values
* API: added experimental watchlist rss/atom feed
* API: if available, json_encode() will be used
* API: opensearch parameter changed to "search=" (more descriptive)
* API: minor parameter cleanup, a wrapper for Feed class
2006-10-16 00:08:03 +00:00
Yuri Astrakhan
7a710254db * API query optimizations
* API allow modules to have custom printers
2006-10-15 07:43:52 +00:00
Yuri Astrakhan
b56d23ed46 * API: Restructured to allow internal usage. Error handling cleanup.
* API: Added opensearch module, added apprefix param for list=allpages
2006-10-14 07:18:08 +00:00
Yuri Astrakhan
04399b2063 * API: added version information to each module (available via api.php?version command) 2006-10-01 21:20:55 +00:00
Yuri Astrakhan
e859600cea * API: pageSet now supports pageids, revised revisions listings, lots of examples. 2006-10-01 20:17:16 +00:00
Yuri Astrakhan
f97b323e00 * API: result data generation cleanup, minor cleaning 2006-10-01 02:02:13 +00:00
Yuri Astrakhan
5c1ca0fc83 * API: Refactored per brion's suggestions
* API: began query revisions implementation (incomplete)
2006-09-27 05:13:48 +00:00
Yuri Astrakhan
8a7397e8ad * API: Overall query-related cleanup. 2006-09-26 06:37:26 +00:00
Yuri Astrakhan
fc6ec50f94 * API: A new ApiPageSet class to retrieve page data and resolve redirects. 2006-09-25 04:12:07 +00:00