Commit graph

49 commits

Author SHA1 Message Date
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
Roan Kattouw
6cba51e734 (bug 15444) API: Throwing a regular 'unknownerror' rather than ('unknownerror', AS_END) when EditPage::AS_END is returned, for consistency with other write modules. 2008-09-03 14:26:41 +00:00
Roan Kattouw
db6744da16 API: Fixed bug that caused all action=edit requests to return with the nochange flag set on wikis where DB_MASTER != DB_SLAVE 2008-08-26 20:49:52 +00:00
Roan Kattouw
1d3b95ab8d API: Throwing a more specific error message when the client tries to create empty new sections, which isn't allowed. Unknown error: ``228'' isn't very user-friendly. 2008-08-26 20:40:44 +00:00
Roan Kattouw
042a034033 API: Add nocreate parameter to action=edit 2008-06-15 20:37:28 +00:00
Roan Kattouw
fd91970655 API: action=edit: Make the combination of prepend/appendtext and md5 do something useful. See also mailing list 2008-06-15 19:59:55 +00:00
Roan Kattouw
8b86f3bc01 (bug 14459) Added prependtext and appendtext parameters to action=edit 2008-06-12 13:05:07 +00:00
Bryan Tong Minh
fb30149415 Remove the AlternateEdit hook from the API: it is a hook meant to show a different EditForm which is not what we want to do. 2008-05-31 14:07:15 +00:00
Roan Kattouw
cf5484e56f API: Added optional md5 parameter to action=edit. If set, the edit will only be committed if the MD5 hash of the text parameter equals the md5 parameter. 2008-05-28 09:22:40 +00:00
Roan Kattouw
aac9e5198e APIEditPage:
* Moving $wgRequest faking down to below the APIEditBeforeSave hook call
* Faking wpCaptcha{Id,Word} in $wgRequest for ConfirmEdit (should also be done better)

Hopefully we'll be able to ditch this crappy EditPage::attemptInternalSave() interface shortly
2008-05-28 09:14:35 +00:00
Bryan Tong Minh
e3275354a0 * Add wfRunHook calls where appropriate
* Fix handling of file redirects in ApiDelete
* Throw an error when a file is undeleted as this is not supported
2008-05-24 20:44:49 +00:00
Leon Weber
bef3c3b755 2008-05-23 22:02:23 +00:00
Roan Kattouw
ea12f3bcaa (bug 14231) Tweak help for action=edit 2008-05-22 21:33:25 +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
Roan Kattouw
72b793a695 Remove deprecated ApiMain::scheduleCommit() 2008-05-18 20:15:56 +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
Roan Kattouw
68bbfc12c0 Committing patch for bug 10931, which also fixes bug 13651. For a detailed explanation of what this commit does, see bug 10931 comment #24 2008-04-11 15:20:45 +00:00
Roan Kattouw
046a97f112 Oops, a backtick snuck in 2008-04-04 13:58:43 +00:00
Roan Kattouw
b384484503 Actually, let's have that commit() call there anyway, the way it currently works relies on the fact that internalAttemptSave() schedules deferred updates, which may change. 2008-04-04 13:49:56 +00:00
Roan Kattouw
1fee715cea (bug 13587) Execute deferred updates in api.php 2008-04-02 18:04:54 +00:00
Roan Kattouw
e8515f4a0b Should've added $dbw->commit() here, hope this fixes bug 13587 2008-04-02 12:13:10 +00:00
Roan Kattouw
d9764955f3 API: Fixing exception in ApiEditPage 2008-03-30 19:20:42 +00:00
Roan Kattouw
6090218f2a API: Rename dontcreate to createonly, which actually makes sense 2008-03-25 21:12:01 +00:00
Roan Kattouw
b1084cc704 Add this parameter so it actually works. I'm not really paying attention today :P 2008-03-25 20:55:30 +00:00
Roan Kattouw
dafa7d21f5 That backslash should be there, I forgot to escape it. 2008-03-25 20:54:11 +00:00
Alexandre Emsenhuber
061b143f29 Parse error. 2008-03-25 20:49:43 +00:00
Roan Kattouw
538ec52cb9 API: Fixing errors in action=edit example 2008-03-25 20:45:10 +00:00
Roan Kattouw
6afa8f9d63 API: Adding dontcreate parameter to action=edit 2008-03-25 20:41:55 +00:00
Roan Kattouw
2f4a97ce28 (bug 13315) Adding section editing to API action=edit. Please read my post on the mediawiki-api list for usage notes 2008-03-12 13:25:12 +00:00
Andrew Garrett
88fbebc858 Fix errors in example for EditPage API module (referred to old names of parameters) 2008-03-06 04:49:02 +00:00
Alexandre Emsenhuber
4f60e33303 setting property svn:keywords Id to api files that don't have it, for use in getVersion() 2008-03-03 19:34:11 +00:00
Alexandre Emsenhuber
618b14e412 setting svn:eol-style native on ApiEditPage.php 2008-03-03 18:19:52 +00:00
Roan Kattouw
e0aae6a658 API: Adding action=edit module 2008-03-03 18:08:40 +00:00