Sam Reed
e22c5cb3e7
While looking at bug 26990 on TW api, it was noticed with a load of NS's they don't word wrap
...
So make them wordwrap like the rest of the text
2011-05-20 17:38:05 +00:00
Antoine Musso
391284b75c
ApiBase::dieUsageMsg() now also accept being given a single element as a string.
...
So the old:
$api->dieUsageMsg( array( 'nologging' ) );
Can now be written:
$api->dieUsageMsg( 'nologging' );
Saves up a few keystrokes.
2011-05-14 11:19:59 +00:00
Sam Reed
3441def388
Documentation
...
Remove long deprecated isBot()/isSysop() in ApiMain
2011-05-08 16:48:30 +00:00
Happy-melon
3f4e0e2e74
(bug 28797) Fix ApiBase::parseMsg() to properly handle nested error arrays.
2011-05-07 13:05:22 +00:00
Sam Reed
f985524076
More versions added to @deprecated tags
...
Couple of inbound calls fixed up
Some ancient code removed as it's been marked deprecated
2011-05-06 21:50:18 +00:00
Jeroen De Dauw
f266b1ca15
small doc fix
2011-04-29 22:05:36 +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
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
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
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
Bryan Tong Minh
8bd336981c
API upload errors may now return the parameter that needs to be changed and a sessionkey to fix the error. This is for now only done for uploads that can be fixed by changing the filename, but may be extended later to comment and pagetext.
2011-03-25 21:22:02 +00:00
Sam Reed
01caf960f2
Followup r82060
...
Calling intval() on an array of integers isn't going to get people very far
simplify logic, and then only do validation if $min or $max are not null
2011-03-03 23:22:39 +00:00
Sam Reed
27ca6b2fa8
Tweak comments, remove some unused stuff.
...
Explicit definitions, move a few minor bits around
2011-02-27 21:10:11 +00:00
Sam Reed
41e7860130
Implement getRequireOnlyOneParameterErrorMessages, to make the error messages requireOnlyOneParameter can throw.
...
Use in 4 modules for more dynamicness
2011-02-25 19:09:39 +00:00
Sam Reed
28f7bf1f2b
Followup r82727, improve comments, cast return value to bool
2011-02-24 16:00:06 +00:00
Sam Reed
ab408b911d
Seems the api edit watch/unwatch wasn't too well tested (after it got poked a lot)
...
EditPage::commitWatch() unconditionally does a watch/unwatch...
And multiple watches of a watched page end up with an INSERT IGNORE, so not a big deal
2011-02-24 15:51:51 +00:00
Sam Reed
3721e827ac
* (bug 27376) when using ApiBase::PARAM_TYPE => 'integer' without a min or max value, api doesn't validate the input is actually an integer
...
Fixup some space indention
2011-02-13 17:00:47 +00:00
Sam Reed
bfd67cf818
Remove some blank lines
...
Spaces to tabs in ApiBase
2011-01-07 02:53:00 +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
Roan Kattouw
ea310d143f
Followup r78824: add missing message
2010-12-29 20:20:55 +00:00
Sam Reed
f63b5040e3
More minor bits of documentation
...
Object type hint on mPrinter
2010-12-23 19:53:28 +00:00
Sam Reed
55ebd95afd
* (bug 24287) Wrap/similar on api help output
2010-12-22 21:40:33 +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
492ac9b4bf
Followup r77666, bug 26219
...
Only add the message about multi value, if the type is not an array, or if it is an array, if it has over 50 (LIMIT_SML1) items
2010-12-04 00:36:33 +00:00
Sam Reed
612c934210
* (bug 26219) Show API limits for multi values in description
...
Also move bug 9675/r77612 RELEASE-NOTES to the correct section
2010-12-03 16:24:05 +00:00
Sam Reed
056b646308
Followup r74988, brion wins again ;D
2010-10-19 18:40:43 +00:00
Sam Reed
c85bf31cf3
Swap usage of create_function for defined function as a callback
2010-10-19 00:44:28 +00:00
Roan Kattouw
9c0b26028f
Revert r74810 (vary API help cache on $wgUser->isAnon()) and move the POST check into the purge module. Also fix the permissions check in action=purge, which was totally broken and based on a misunderstanding of what the 'purge' right means.
2010-10-18 09:19:20 +00:00
Sam Reed
519173c0e4
Followup r74234 flip parameters
2010-10-04 21:18:38 +00:00
Sam Reed
9cda0105a9
Minor tweaks to r74232, add a value for $botMax on calls for integer validation (otherwise the bool gets pushed into it!)
...
Documentation in ApiDelete
2010-10-03 20:29:44 +00:00
Sam Reed
69107791db
Followup r74230, if we make things array, we should make them not an array afterwards
...
Well, the more sane way, is just treat them seperately, than having to do $value = $value[0];, based on whether it was an array already
Cheers to Siebrand (was already poking it myself :))
2010-10-03 20:07:23 +00:00
Sam Reed
7ad52b7bdd
First part of "*(bug 25303) API: integer parameter validation does not actually validate, only warn"
...
Actually make the validation of the range occur
Fix typo in ApiBase.php
2010-10-03 19:07:11 +00:00
Sam Reed
42b5c265c0
* (bug 25248) API: paraminfo errors with certain modules
...
Added a needsToken() function, rather than calling getTokenSalt, which can throw silly errors due to dependencies on parameters
2010-10-01 20:12:50 +00:00
Sam Reed
9d1e45bf42
Tweak/add some documentation as hints for some code analysis
2010-09-28 01:33:11 +00:00
Sam Reed
6c1273bc7d
Fill in missing params from a dieUsage
...
Braces
Fixup parameter documentation
2010-09-25 16:45:41 +00:00
Sam Reed
f07567201f
Remove some unused variables
...
Tweak php doc, "One" is not a type, so insert string in there
2010-09-25 16:37:39 +00:00
Sam Reed
ee04d754ed
Only display Examples section if it's got anything in the array
2010-09-03 22:58:09 +00:00
Sam Reed
fc38716f49
ApiBase.php:
...
"Don't show No more than 500 ( for bots) allowed" when MAX2 isn't set
Trim trailing whitespace from Database.php
2010-08-31 21:06:01 +00:00
Sam Reed
5d383466e1
Minor followup to r70480
...
Only throw missingparam for string === '' when it is required
RELEASE-NOTES for breaking change
2010-08-19 14:54:09 +00:00
Platonides
50e2405a03
Refactor to avoid defining globals inside switches.
2010-08-12 14:25:07 +00:00
Alexandre Emsenhuber
457eb73b61
Standardised file description headers, added @file
2010-08-07 19:59:42 +00:00
Sam Reed
7128c455cc
Followup r69091 Where did those spaces come from? :/
2010-08-05 07:08:06 +00:00
Sam Reed
ddc7efbedf
stylize api up to date
2010-08-05 07:02:09 +00:00
Sam Reed
c85b04919e
Revert r70489
2010-08-05 06:58:11 +00:00
Sam Reed
0345d5e08f
Move if ( is_array( $value ) && !$dupes ) { up to else block after the first !is_array. If it's not not an array, it's an array, and therefore, we can just filter dupes if requested
2010-08-05 06:08:23 +00:00
Sam Reed
c95f4a05ad
Followup r70480, per Nikerabbits comment, there '''is''' something to do
2010-08-05 06:02:57 +00:00
Sam Reed
0ccf248381
-rakkaus/#mediawiki-i18n- [04-Aug-2010 22:02:04] PHP Notice: Undefined variable: required in /www/w/includes/api/ApiBase.php on line 749
2010-08-04 22:02:57 +00:00