Commit graph

1906 commits

Author SHA1 Message Date
Sam Reed
6f9897cffe * (bug 28265) allow outputting of comments for action=expandtemplates 2011-05-01 22:11:05 +00:00
Sam Reed
c8079f0b81 * (bug 27185) API: Add Special:ComparePages 2011-05-01 21:56:02 +00:00
Max Semenik
2f3a13e3a4 Use HTML5 for formatted API output 2011-05-01 21:19:40 +00:00
Sam Reed
0b96c67a9e Remove unneeded manual quoting from r87180 2011-05-01 11:20:14 +00:00
Sam Reed
5283490bdd * (bug 28225) Allow hiding of user groups in list=allusers
Yay, a LEFT OUTER JOIN
2011-05-01 00:24:39 +00:00
Sam Reed
c3b1500161 $db is already defined, don't use $this->getDB() again 2011-05-01 00:17:39 +00:00
Sam Reed
ab28af877c Followup r85884
Fixup the APIs strange way of doing table aliases on a join....

Only used in very few places
2011-04-30 23:18: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
ef6afb5d9e Tweak documentation
Add braces
2011-04-29 23:34:37 +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
Jeroen De Dauw
f266b1ca15 small doc fix 2011-04-29 22:05:36 +00:00
Sam Reed
4d18298e86 Followup r87132, per Bryan, still return the "limit" to be the current users limit, but return high/low limit 2011-04-29 21:46:17 +00:00
Sam Reed
32f8443064 * (bug 28238) paraminfo: output both limits for multi param 2011-04-29 20:52:57 +00:00
Jeroen De Dauw
22cd74d272 fix return type descriptions 2011-04-29 15:41:57 +00:00
Jeroen De Dauw
f8dc68bd98 fix typo 2011-04-29 15:37:01 +00:00
Max Semenik
2da3d34301 Oops, forgot to revert r86954 in r86973, not needed anymore 2011-04-26 19:23:23 +00:00
Max Semenik
40294d93ba Follow-up r86954: make one centralised call to array_values(), there are more breakages of this kind 2011-04-26 19:20:19 +00:00
Max Semenik
11822535e7 Without this array_values(), user groups will be exported to JSON as object instead of array 2011-04-26 17:29:57 +00:00
Sam Reed
6d118609c1 * (bug 28702) Undefined offset in ApiParamInfo.php
Followup r85758 (bug 28254)

If no DFLT is set, fall back to "null", which means a string parameter
2011-04-25 22:56:08 +00:00
Max Semenik
220279a352 Rm all mentions of "this module" in API action descriptions. They are supposed to be read by API users, not MW coders, thus internal terminology shouldn't be used here. 2011-04-25 14:05:57 +00:00
Max Semenik
301e940435 Fix typo in description 2011-04-25 13:44:54 +00:00
Sam Reed
f3a9b12a73 * (bug 28560) list=deletedrevs should die, if combination of param is invalid
No checking for NS or unique in the mode 1/2 checks, as they have defaults of 0 and false, which is impossible to determine if they had been set as that, or just using the defaults. They are ignored in the code still on the incorrect path

Update usage of dir
2011-04-23 16:57:03 +00:00
Sam Reed
24b465161c * (bug 27344) add drprefix param to list=deletedrevs 2011-04-23 16:03:40 +00:00
Sam Reed
c28ffe91c1 Followup r86763, and also fix ancient revision from SpecialProtectedpages (Aaron at fault), use $db->getInfinity() 2011-04-23 14:24:42 +00:00
Sam Reed
40f33eb663 Add some more spacing due to long parameter names
Use str_repeat for ease rather than "     " etc

Fix MiserMode to MiserMode
2011-04-23 13:29:11 +00:00
Sam Reed
82329a9276 * (bug 26882) Allow listing of indefinite protections with the api
Swap some !empty for count
2011-04-23 13:07:40 +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
Alexandre Emsenhuber
21e53d3590 * Added Profiler::isStub() to check if we are using a stub profiler, instead of checking whether $wgProfiler is set
* Replaced wfProfileClose() and wfGetProfilingOutput() by direct calls to the Profiler instance and removed them, no uses in extensions
* Also removed useless params from Profiler::getOutput() call in wfLogProfilingData()
* Only generate profiling output if it'll be used; introduced Profiler::logData() that saves profiling data (database, udp, ...) to separate it from output generation
* Removed unused Profiler::getCaller(), not used at all, and we have wfGetCaller() that does the same thing
2011-04-21 16:31:02 +00:00
Chad Horohoe
783d4e0862 Remove @static from all over the place. That's what the static keyword is for, this being PHP5 and all 2011-04-21 00:07:09 +00:00
Roan Kattouw
dd67a0917b API: Clarify help text for cmstartsortkey and cmendsortkey parameters 2011-04-19 15:46:05 +00:00
Chad Horohoe
767fd9aa13 Per CR on r78824 (#c12467): Some query pages are useless/redundant, since we already output them elsewhere in the API, so we shouldn't expose them. 2011-04-18 17:04:50 +00:00
Sam Reed
a6569e0294 * (bug 28586) YAML: strings that are the same as boolean literals
* (bug 28591) Update/replace/supplement spyc (YAML parsing library)
* YAML API output is now 1.2 compliant, using JSON as the formatter

YAML 1.2 spec is a JSON subset - "The primary objective of this revision is to bring YAML into compliance with JSON as an official subset. YAML 1.2 is compatible with 1.1 for most practical applications - this is a minor revision." [1] Per discussion with Tim, switch YAML to use the JSON formatter

Was originally going to delete the ApiFormatYaml per Tim, but class needed to keep nicer (and apparent) output in API help page

Hence made subclass ApiFormatJson, minimal method overriding

spyc.php deleted from libs

[1] http://www.yaml.org/spec/1.2/spec.html#id2803629
2011-04-18 11:42:44 +00:00
Happy-melon
400357e90a Follow-up r85929: update MediaWiki::articleFromTitle() calls in extensions (and a few edgecases which were missed in core) 2011-04-17 19:25:30 +00:00
Roan Kattouw
8cc843f25c API: BREAKING CHANGE: (bug 28541) Output of binary ICU sortkeys is broken. Change sortkey fields in prop=categories and list=categorymembers to hexadecimal strings, that way we don't have any issues with scary binary stuff. Also change cmcontinue to take hex-encoded sortkeys and swap the order back to normal (previously sortkey was at the end because it could contain pipe characters, but that's not an issue with hex). 2011-04-17 12:41:29 +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
Brian Wolff
74f16767e7 Merge to trunk everything in img_metadata branch.
Hope I did this in an ok fashion. svn merge --re-integrate was giving me issues
so I just essentially over-wrote my working copy with the version at img_metadata.
2011-04-16 01:23:15 +00:00
Bryan Tong Minh
e04879cf89 Follow-up r83302: Check permissions 2011-04-14 21:09:16 +00:00
Happy-melon
8779f4b55f r86001, now with less scariness :P I took out the delete action and did purge instead, which is a much more self-contained action-with-a-form. Also implement a few changes suggested by Brion on IRC last night. 2011-04-14 10:38:29 +00:00
Happy-melon
bc4a096805 Revert r86001: Brion says it's too scary :D will recommit in pieces 2011-04-13 23:36:27 +00:00
Happy-melon
6dc8136d12 New infrastructure for actions, as discussed on wikitech-l. Fairly huge commit.
* Actions come in two flavours: the show-a-form-then-do-something-with-the-result (delete, protect, edit, etc) and the just-do-something (watch, rollback, patrol, etc).  Create abstract base classes Action and FormlessAction to support these two cases.  HTMLForm is an integral part of the form-based structure.
* Look mum, no globals!  :D  Fully context-based.
* Implement watch/unwatch, credits and delete actions in the new system as proof-of-concept.  This also gives the delete frontend a much-needed overhaul.
* Stub out the newly-deprecated functions from Article.php.  This already reduces its linecount by about 15%, and there are plenty more actions still to do.
* Centralising actions like this is going to render a lot of hooks type-incompatible.  There's simply nowhere you can put the ArticleConfirmDelete hook, for instance, where it can be passed an OutputPage as the second parameter.  On the other hand, we can implement new hooks like ActionModifyFormFields and ActionBeforeFormDisplay, which can do much prettier stuff to the forms, like adding extra fields the 'right' way.  Update LiquidThreads to use these new hooks where appropriate.
2011-04-13 23:04:07 +00:00
Sam Reed
12d7d7b90f * (bug 26873) API: Add 'toponly' filter in usercontribs module 2011-04-10 21:52:34 +00:00
Sam Reed
00b3434d47 * (bug 28455) Add 'toponly' to recentchanges API module 2011-04-10 21:42:20 +00:00
Sam Reed
f502988282 * (bug 27712) add parent_id to list=deletedrevs 2011-04-10 21:11:39 +00:00
Sam Reed
af3a1052ff * (bug 28254) action=paraminfo: Extract type from PARAM_DFLT if PARAM_TYPE is not set
Patch by Umherirrender
2011-04-10 13:01:47 +00:00
Sam Reed
00f0594736 * (bug 28364) add registration date to meta=userinfo 2011-04-10 12:27:32 +00:00
Sam Reed
09ea8906a2 * (bug 28368) add hint for multipart/form-data to api information of action=import&xml=
Add RELEASE-NOTES for r85585 too
2011-04-10 12:15:03 +00:00
Aaron Schulz
50df1d4794 Quick fix to categoriesHtml() given new skin changes 2011-04-10 06:46:02 +00:00