Sam Reed
f77fff0ffb
Followup r70461 if PARAM_REQUIRED is set, use for missing param in getPossibleErrors in ApiBase
...
All but ApiQueryBacklinks
2010-08-04 19:20:15 +00:00
X!
1afd723c5b
Followup to r70460 and r70461: Use true instead of 1
2010-08-04 14:29:39 +00:00
X!
8b466d3d0d
Followup to r70460: Committed wrong version of ApiBase.php, convert all core API modules to PARAM_REQUIRED syntax
2010-08-04 14:15:33 +00:00
Sam Reed
5387b8a806
Stylize API up to date
...
Fix spaces from r69755
Minor update to RELEASE-NOTES per r69753
2010-07-23 07:33:40 +00:00
Aryeh Gregor
1b1d821d16
Remove 'minordefault' preference completely
...
See bug 24313. The preference encourages people to mark changes minor
by mistake, but it's better to have minor changes not marked minor than
non-minor changes marked minor. enwiki users at [[Help talk:Minor
edit]] seemed to think it was a good idea. Plus, I'm always in favor of
removing user preferences where possible.
The only likely fallout of note is some bot operators who didn't notice
this suddenly find their bot not marking anything minor. I doubt it
will cause major problems, though.
2010-07-14 18:50:32 +00:00
Sam Reed
f5c639fd10
Stylize API
...
Add a few braces
2010-07-06 13:15:59 +00:00
Sam Reed
41f8208fb1
Minor followup to r68636, add to getPossibleErrors
2010-06-27 20:30:43 +00:00
Sam Reed
3fe7b6912b
* (bug 24136) unknownerror when adding new section without summary, but forceditsummary
...
Handle AS_SUMMARY_NEEDED in ApiEditPage
Fixup some braces
2010-06-27 19:22:46 +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
Bryan Tong Minh
26fa8cb9f1
Return some more verbose error messages when editing fails using the API. Added wfDeprecated to Article::updateArticle() and used the Status result from Article::doEdit directly in EditPage::internalAttemptSave.
2010-06-09 19:52:11 +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
Bryan Tong Minh
6c6c2f698c
Followup to r64962: Fixed watchlist parameter in API. User options watchdeletions and watchmoves can now by overridden. Unwatching while editting is now possible.
2010-04-14 12:17:39 +00:00
Sam Reed
d840fbbc95
Revert r64955
...
Again partial fix to bug 23167
Bugfix watch on creation (edit and upload), in current form, setting unwatch, or nochange would follow watchcreation, which wasn't requested
2010-04-12 10:44:45 +00:00
Sam Reed
789cc18185
Followup r64197
...
Return null in getWatchlistValue if no change
Fixup unneccessary watch/unwatch calls
Remove useless unwatch from ApiUpload
2010-03-28 15:08:45 +00:00
Sam Reed
88df448d36
Fix bug 22944 in a much better fashion (using watchlist parameter)
...
Deprecate old watch/unwatch parameters
Move generic watchlist stuff to ApiBase/getWatchlistValue (maybe needs renaming better?)
Tweak some braces in ApiEditPage
2010-03-25 22:15:08 +00:00
Jack Phoenix
c6f2480903
ApiEditPage.php: fix copyright symbol, spacing and coding style cleanup, more braces
2010-02-22 12:18:42 +00:00
Sam Reed
41ba6ce60f
Minor fixup to api/ApiEditPage.php to remove getMaxArticleSize function
2010-02-16 22:01:38 +00:00
Sam Reed
878c7da630
Followup to r62557 as per Roans comment
2010-02-16 21:59:16 +00:00
Sam Reed
7478ad3576
Remove a couple of duplicated errors from ApiEditPage getPossibleErrors
...
Unindent one level in ApiMain substituteResultWithError
2010-02-15 23:56:09 +00:00
Sam Reed
0e8b0b41ac
Refactor requiresToken to getTokenSalt - Returns salt if exists, null if no salt, else false if no token required
...
Move sessionfailure (token validation checking) up a couple of levels
Part of bug 21991
Followup to r62482 and r62504
2010-02-15 23:53:43 +00:00
Sam Reed
80f9448690
Start of "Bug 21991 - Move common query parameter (uc, rc) validation, token requiringness/checking to ApiBase/Similar"
...
Move token requringness check to the ApiMain
Adding an exception if we're using "gettoken" (block/unblock)
Remove array( 'missingparam', 'token' ), from the getPossibleErrors of modules that set requireToken method to true
2010-02-14 22:20:27 +00:00
Sam Reed
9e44e9295d
Fixup spaces to tabs from r62404
2010-02-14 14:29:24 +00:00
Sam Reed
6852091907
Fix fail in ApiEditPage.php
2010-02-13 01:24:00 +00:00
Sam Reed
6911358977
Complete dieUsage errors in 6 more Api files
2010-02-13 01:05:14 +00:00
Sam Reed
2081a0693f
Rest of dieUsageMsg in getPossibleErrors
2010-02-13 00:28:27 +00:00
Sam Reed
b15f2c8c46
Normalise comment usage (# --> //)
2010-01-23 22:52:40 +00:00
Sam Reed
47c24175d3
Add/remove whitelines to increase readability in API code files
2010-01-23 22:26:40 +00:00
Sam Reed
9513f0bc3f
(bug 22225) - misspelt wpEdittoken -> wpEditToken in ApiEditPage
...
Patch By Matthew Britton
2010-01-22 10:48:57 +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
Roan Kattouw
f9d79167d3
API: (bug 20967) action=edit allows creation of invalid titles that look like interwiki titles. Patch by Sam Reed
2009-11-06 14:44:04 +00:00
Bryan Tong Minh
be1cd24b80
Throw a bit more helpful unknownerror at AS_END, indicating that AS_END was encountered. This actually needs fixing higher up, but this at least clarifies for now what kind of unknownerror occurred.
2009-10-28 13:35:39 +00:00
Chad Horohoe
c660ee428f
(bug 21106) tag deprecated parameter in action=paraminfo. Add new PARAM_DEPRECATED const for automagically tagging deprecated parameters. Keeps action=help and action=paraminfo up to date
2009-10-28 00:56:07 +00:00
Roan Kattouw
0a7ce36121
API: (bug 20816) Editing a page with &watchlist=preferences (default) unwatches it if you're watching it but don't have watching preferences set. This is a regression from r53266
2009-09-26 09:22:44 +00:00
Brion Vibber
aa1740d88d
Cleaning up some old PHP 4 object-reference usage in some edit filtering hooks.
...
There was a mix of uses of the reference and non-uses of the reference. :)
Reverts r53714 and fixes it from the other end by cleaning up the uses to not expect references.
2009-08-21 21:51:29 +00:00
Bryan Tong Minh
f5137ba626
(bug 19090) Added watchlist parameter, deprecated watch and unwatch parameter in action=edit
2009-07-14 20:48:00 +00:00
Bryan Tong Minh
d8aa4337f9
(bug 19040) Fix prependtext and appendtext in combination with section parameter in action=edit
2009-07-14 20:14:47 +00:00
Bryan Tong Minh
31d9947618
(bug 18533) Add readonly reason to readonly exception
2009-07-12 12:38:03 +00:00
Roan Kattouw
ea5b014e38
Followup to r50132: I guess I was smoking some pretty good stuff there
2009-05-02 15:03:02 +00:00
Roan Kattouw
5924eb85f0
API: Set $wgTitle to a dummy title in api.php, and introduce defined('API') as a check for API mode. This should fix errors about $wgTitle being null
2009-05-02 14:47:26 +00:00
Roan Kattouw
674724e686
API: (bug 18546) Added timestamp of new revision to action=edit output
2009-04-21 14:49:13 +00:00
Roan Kattouw
ac81ec6513
API: (bug 18099) Editing a non-existent page with appendtext caused the contents of the noarticletext(anon) message to appear in the page text
2009-03-24 16:15:43 +00:00
Roan Kattouw
21fd7af97e
* API: (bug 17774) API pretends action=query doesn't exist for users without read rights
...
* Instead of hiding read-restricted modules, throw an error when a user without read rights tries to use them
* Do the same for write modules when $wgEnableWriteAPI is false
* Indicate whether a module needs read or write rights in action=help and action=paraminfo
* BREAKING CHANGE: action=purge now requires write rights and, for anonymous users, a POST request
2009-03-06 13:49:44 +00:00
Roan Kattouw
88f35cdf6e
API: Some cleanup
...
* Aggressively intval() numeric things; addresses the concerns raised on bug 11633
* Use ApiQueryBase::addTitleInfo() everywhere
* Remove a drug-induced-looking line from ApiQueryWatchlist.php
2009-02-27 16:03:01 +00:00
Roan Kattouw
6449867508
* API: (bug 15949) Add undo functionality to action=edit
...
* Move undo text generation from EditPage::getContent() to Article::getUndoText()
* Add some more examples for action=edit
* ApiEditPage.php: don't mix !is_null() and isset(), be consistent
2009-01-26 13:51:03 +00:00
Roan Kattouw
7c6e96a734
API: (bug 16581) Fix regression from r44015 ("Various minor cleanup") which changed Article::replaceSection() to treat $section=null as $section=0 rather than $section='' as it did before, causing a nasty API edit bug. When changing a function's behavior, please update the callers, and don't forget the API.
2008-12-10 14:12:54 +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
5896f16a44
(bug 15647) API edit with basetimestamp fails if the page has been deleted and undeleted since the last edit
2008-10-04 13:43:17 +00:00
Rotem Liss
8b54f0f2b5
Fixing a function call.
2008-09-30 16:08:39 +00:00
Chad Horohoe
acf01dd7b8
Added setVal accessor to $wgRequest->data so we don't have to access it directly. Use this in ApiEditPage.
2008-09-30 15:13:13 +00:00
Roan Kattouw
b294f9a437
(bug 15473) Correcting Doxygen comment for ApiEditPage
2008-09-04 13:40:33 +00:00