Commit graph

37 commits

Author SHA1 Message Date
Sam Reed
bd1a643e6e Change layout of the mustBePosted format to standardise it 2010-02-14 21:12:11 +00:00
Sam Reed
9e44e9295d Fixup spaces to tabs from r62404 2010-02-14 14:29:24 +00:00
Sam Reed
c03a4e3214 And an erroneous ) 2010-02-13 00:50:45 +00:00
Sam Reed
d9cfde1395 Rem erroneous bracket, followup to r62404 2010-02-13 00:49:53 +00:00
Sam Reed
2081a0693f Rest of dieUsageMsg in getPossibleErrors 2010-02-13 00:28:27 +00:00
Sam Reed
b739e97341 More of r61437 (adding/removing whitespace) 2010-01-23 22:47:49 +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
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Sam Reed
8dcfd8207f bug 21740 Attempting to protect a page that doesn't exist (salting) returns "unknown error"
Message usage was plural, definition was singular
2009-12-02 00:23:05 +00:00
Bryan Tong Minh
6fec9d682b Follow-up to r58633 and r58628 (lqt): Rename Title::getProtectionTypes to Title::getRestrictionTypes and fix the hook name. 2009-11-09 12:05:30 +00:00
Andrew Garrett
f6f5e90888 Enabling changes for r56828: some refactoring and code cleanup of the protection interface, including a new hook, generalisation to more restriction types than edit/move, and some other related changes. 2009-11-06 10:27:44 +00:00
Roan Kattouw
2f1af4d476 * API: (bug 17832) action=delete returns 'unknownerror' instead of 'permissiondenied' when the current user is blocked
* Fix this by changing all calls to current() to reset()
2009-03-07 12:58:41 +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
a2974f51f1 API: (bug 17317) Added watch parameter to action=protect 2009-02-02 16:38:40 +00:00
Roan Kattouw
ada841ab2d * API: (bug 16613) action=protect doesn't say when &cascade is set but cascading protection wasn't allowed
* Changed Article::updateRestrictions()'s $cascade parameter to a reference which is set to false if cascading protection isn't allowed
* Used this in ApiProtect
* Expand help message for &cascade a bit
2008-12-10 22:39:41 +00:00
Alex Z
1b580a65d2 (bug 16207) - Fix title protection in the API. $expiry is cast to an array near the start and doesn't have the correct timestamp format here anyway. 2008-11-01 00:00:25 +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
bb71d34114 Remove debugging code 2008-10-04 15:06:24 +00:00
Roan Kattouw
212720fa28 API: * (bug 15785) Allow for different expiry times for different protections, like the UI does
* BREAKING CHANGE: Alter action=protect output to display multiple expiry times
* BREAKING CHANGE: Error messages invalidexpiry and pastexpiry now state the expiry they're about
* Add ApiBase::PARAM_ALLOW_DUPLICATES and honor it in ApiBase::getParameterFromSettings()
2008-10-04 14:58:13 +00:00
Matt Johnston
cd7aa10e89 (bug 15791) Typo in API docs, APIProtect has some remnants of help messages from deletion/restoration. 2008-09-30 21:03:38 +00:00
Alex Z
1f5da24b79 *Don't let the API action=protect set actions that aren't in $wgRestrictionTypes or levels not in $wgRestrictionLevels
*Pass an array to Article::updateRestrictions for the expiry. Though it should allow for separate expiry times, like the normal UI.
2008-09-18 21:30:51 +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
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
e9b1eb0875 Changing name of error code to something making slightly more sense 2008-01-08 16:36:47 +00:00
Roan Kattouw
7523ddffb4 * (bug 12543) API should support new protected titles system
* Changing ApiProtect to return ISO 8601 timestamps
* This doesn't really need a RELEASE-NOTES entry, as the protected titles system is already mentioned in RELEASE-NOTES
2008-01-08 16:31:50 +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
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
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