Commit graph

32 commits

Author SHA1 Message Date
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
Alex Z
216e60d01e (bug 18019) Warn users when moving a file to a name in use on a shared repo.
Allow only users with the 'reupload-shared' right to complete the move.
2009-10-24 04:36:11 +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
40b6193c06 Remove a TODO from ApiMove and add a FIXME to SpecialMovepage 2009-02-09 15:15:49 +00:00
Roan Kattouw
81bf8d0a3a * API: (bug 17357) Add subpage moving to the API
* Added Title::moveSubpages() as a backend function
** Didn't update SpecialMovepage to use this; left to braver souls
* Fix handling of errors on talk page move (will backport)
2009-02-09 14:16:51 +00:00
Roan Kattouw
3ff1f89e0c * (bug 15845) API: Added pageid/fromid parameter to action=delete/move, making manipulation of legacy pages with invalid titles possible
* Fix an E_STRICT while I'm at it
2008-10-07 14:57:59 +00:00
Roan Kattouw
a24da23922 We can at least *pretend* to be consistent here 2008-09-25 21:41:13 +00:00
Roan Kattouw
b62ddd3971 API:
* Title::moveTo() has been returning a getUserPermissionsErrors()-like array for ages now, let's use it correctly in ApiMove and skip the double-checks
* Remove some outdated TODO/FIXME comments
2008-09-25 21:39:36 +00:00
Roan Kattouw
b8e624d367 API: Uniformizing descriptions for write modules 2008-09-07 19:12:41 +00:00
Bryan Tong Minh
f8a7159e6c Always return an array if an error has occurred in Title::moveTo. 2008-05-30 19:59:47 +00:00
Roan Kattouw
f43e8e6857 In the spirit of r35407, don't go crazy if Title::moveTo() returns a string (which it sometimes does) 2008-05-27 16:54:14 +00:00
Roan Kattouw
d478350295 * Refactor Title::isValidMoveOperation() and Title::moveTo() to return an array of arrays like Title::getUserPermissionsErrors() does; other functions used by the write API have undergone similar refactoring earlier
* Handle these return values in MovePageForm::doSubmit() and ApiMove::execute()
* Remove separate AbortMove hook calls from MovePageForm and ApiMove; these were used to capture the hook error, but the new return type handles that. Also, it resulted in two calls to that hook for each move
* Remove comment about SpecialMovepageAfterMove hook from ApiMove::execute(): we don't need it, there's the TitleMoveComplete hook for that. SpecialMovepageAfterMove is a UI hook that doesn't belong in the API
* Add imagenocrossnamespace and imagetypemismatch errors to ApiBase::$messageMap
2008-05-27 14:42:51 +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
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
8aba62cf9f API: Added watch and unwatch parameters to action=move and action=delete 2008-03-02 19:00:50 +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
Roan Kattouw
491cc4a320 API: Making a bunch of state-changing modules require POST requests. 2008-01-18 20:43:59 +00:00
Roan Kattouw
d371af72a8 API:
* Refactored ApiProtect. No need for core modifications this time :)
* Added permissions check to ApiMove to protect against messages with arguments getting none. moveTo()'s return value should really be modified, see also comment
2008-01-18 16:34:40 +00:00
Roan Kattouw
1b2b5ecde0 API: Unifying "the ... parameter must be set" messages into one ('missingparam'), expanding $1 in error codes as well. 2008-01-18 16:01:31 +00:00
Roan Kattouw
1f4ddb930d Core:
* Using getUserPermissionsErrors() rather than userCan() in Title::isValidMoveOperation()
* Removing blocked check from Article::doRollback(): Title::getUserPermissionsErrors() checks for that already

API:
* Refactoring ApiMove to use new messages system
* Adding more messages to ApiBase::$messageMap
* Removing unused parameter to 'notanarticle' in ApiDelete::execute()
2008-01-18 15:52:40 +00:00
Victor Vasiliev
0495f90ebb Revert r28215: incorrectly moved files 2007-12-06 18:33:18 +00:00
Victor Vasiliev
4e4cdf079e Create includes/api/query for Query API and includes/api/edit for Edit API 2007-12-06 18:22:15 +00:00
Victor Vasiliev
88c6568f2b Fix svn:eol-style and svn:keywords for files from merged APIEdit branch 2007-12-06 16:06:22 +00:00
Roan Kattouw
2821f1ef71 Removing double tabs inserted due to my editor's retarded tabsize=4 setting. 2007-12-04 16:33:08 +00:00
Roan Kattouw
fd5a884b77 API: A cleaner implementation of r28057: this one also hides disabled modules from the list of possible actions on top of the help screen. 2007-12-03 15:52:27 +00:00
Victor Vasiliev
3a24c169ea API:
* Hide edit modules from help if $wgEnableWriteAPI is disabled
* Fix help formatting on UsageException
2007-12-02 15:04:53 +00:00
Roan Kattouw
6e2d0cd173 Oops, forgot a few. 2007-12-02 14:43:37 +00:00
Roan Kattouw
3bbe80f2b0 Oops, requestWriteMode() is in ApiMain, not ApiBase 2007-12-02 14:36:32 +00:00
Roan Kattouw
730bad3fb1 APIEDIT BRANCH MERGE: Adding apiedit modules: action={block,changerights,delete,move,protect,rollback,unblock,undelete} and list={blocks,deletedrevs}. $wgEnableWriteAPI must be explicitly set to enable these modules. 2007-12-02 14:24:07 +00:00