aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiProtect.php
Commit message (Collapse)AuthorAgeFilesLines
...
* (bug 38190) Add "required" flag to some token paramsumherirrender2012-07-201-1/+4
| | | | | | action=block/action=unblock can not have the token required because when using the gettoken param, the token param can not set. Change-Id: I15317f16c06f150d29c1b17de76f41a6cfa84820
* Merge "escape HTML elements in docblock with double quotes"Aaron Schulz2012-07-181-1/+1
|\
| * escape HTML elements in docblock with double quotesAntoine Musso2012-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doxygen choke on text enclosed by '<' and '>' since it tries to interpret them as HTML or XML elements. This patch adds double quotes in includes/api/*.php files around the two following strings: <Firstname>.<Lastname>@gmail.com <Firstname><Lastname>@gmail.com Which becomes: "<Firstname>.<Lastname>@gmail.com" "<Firstname><Lastname>@gmail.com" Tested locally, it prevents doxygen 1.8.0 related warnings. Change-Id: I36d82eb3fd4989ee3ffc65b0b527b83711d1ba69
* | API: Cleanup around comment/reason paramsumherirrender2012-07-081-1/+1
|/ | | | | | | | | * Moving setting of empty string to param description. * Removing word "(optional)" from comment/reason param, because all not required params are optional. * Correct description of action=rollback for default comment. Change-Id: Ifa5b60a7b55b216c43049cd81cb584b2e0518eed
* Added result properties to action=paraminfoPetr Onderka2012-06-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Added information about the properties of the results of API calls to action=paraminfo, including information about "property groups": what should the prop parameter be set to to get that property. Uses the same format for types as parameters already do. The output format of some modules doesn't fit this, so the result properties for them weren't added, or only partially. Partially implemented modules: * expandtemplates: parsetree is in its own tag * protect, allusers, backlinks, deletedrevs, info, imageinfo, logevents, querypage, recentchanges, revisions, searchinfo, usercontribs, userinfo, users, watchlist, upload: response with partially complex structure Not implemented modules: * feedcontributions, feedwatchlist, opensearch, rds: non-standard reponse * help: error is normal response; not very useful for automated tools anyway * paraminfo, parse, pageprops, siteinfo, userrights: response with complex structure Change-Id: Iff2a9bef79f994e73eef3062b4dd5461bff968ab
* Merge "multi dbms support in api"Aaron Schulz2012-05-201-3/+3
|\
| * multi dbms support in apiumherirrender2012-05-161-3/+3
| | | | | | | | | | | | | | | | | | | | Add some calls to Database::timestamp Change some calls from Database::strencode to Database::addQuotes to avoid ' in raw sql Remove ' from ints in raw sql Rename some vars to avoid duplicate names Change-Id: I63f5602fa968f969a42932902a3ccc45fc54b432
* | Don't make two database requests to load the same object, again.Alexandre Emsenhuber2012-05-041-2/+2
|/ | | | | | | | I know there's no second parameter to WikiPage::newFromID(), but this will change soon. This follows-up I098dd36619fff3610be6894037220d3472b809d5. Change-Id: Ic28b7e05db51e55a5f49fed70c042ba11e4d97fe
* (bug 30488) API now allows listing of backlinks/embeddedin/imageusageumherirrender2012-05-021-2/+0
| | | | | | | | | per pageid Move the possibles errors set by ApiBase::getTitleOrPageId to ApiBase::getTitleOrPageIdErrorMessages and remove it from used modules Change-Id: If037e04665d2524c1f2476bc7996d9573753a4b8
* Simplify and refactor out api code for getting title or page idReedy2012-04-271-17/+3
| | | | Change-Id: I098dd36619fff3610be6894037220d3472b809d5
* Make data loading a bit better in ApiProtect.Alexandre Emsenhuber2012-04-251-3/+5
| | | | | | | * Use WikiPage::newFromID() directly instead of Title::newFromID() (change pending review to improve it) * Directly load the data from the master when creating a page from its name, it avoids a second database query when calling $this->getLatest() in WikiPage::doUpdateRestrictions() Change-Id: I993d087961c0ef41a2e3f8d949922d3d30ca1fde
* (bug 32497) API now allows changing of protection level using pageidAlex Monk2012-04-071-15/+32
| | | | Change-Id: I01802dde2fba9510cbdf23522ddac59f36a93960
* * Merged WikiPage::updateRestrictions() and Title::updateTitleProtection() ↵Alexandre Emsenhuber2011-12-181-10/+6
| | | | | | | | | | | | | | into WikiPage::doUpdateRestrictions(); older methods still work for backward compatibility, but marked Title::updateTitleProtection() as deprecated and for removal in 1.20 since no extension calls it * Removed permissions check from WikiPage::doUpdateRestrictions() and left it for callers, resolves the todo from documentation * Inverted $expiry and $reason parameter between WikiPage::doUpdateRestrictions() and WikiPage::updateRestrictions() for more consistency; WikiPage::doUpdateRestrictions() also requires all parameters to be passed * WikiPage::doUpdateRestrictions() returns a Status object instead of bool for the older one; only possible error at the moment is a read-only database * Updated core calls to these functions * Made maintenance scripts using it simply protect all actions returned by Title::getRestrictionTypes() instead of hardcoded 'edit' and 'move' * This also means that protect.php can be used to protect a non-existing page for creation Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106567
* Oh noes, moar http:// -> https://Sam Reed2011-11-281-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/104445
* Removed the 'eclipse helper' bit on top of every API moduleJohn Du Hart2011-11-161-5/+0
| | | | | | | | It's a parctice that dates back to 2006 when the API was first written, and frankly isn't covered by the coding conventions. Same thing with the docblocks, they're all copypasted with some bits changed and don't even make sense if you look at them in the genereated code docs. I don't feel that any of us depend on this anymore (get a better IDE), so in the inerest of consistancy it's time we said goodbye to it. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103273
* Use WikiPage instead of ArticleAlexandre Emsenhuber2011-11-121-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/102847
* Adding context to the APIJohn Du Hart2011-10-261-2/+2
| | | | | | | This will probably break something somewhere so when it does please yell at me on IRC and I'll fix it. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100905
* Based on diff to wikia, set more functions consistently public rather than ↵Sam Reed2011-08-171-1/+1
| | | | | | | protected Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/94827
* Followup r92396, add help urls for most of the core (non query) modulesSam Reed2011-07-171-0/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/92398
* Replace more multiple calls to $this->getResult() in methods with temporary ↵Sam Reed2011-06-301-2/+3
| | | | | | | variable Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/91147
* Single messages can be passed as strings to Api::dieUsageMsg()Antoine Musso2011-05-191-2/+2
| | | | | | | Since r88045 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/88416
* Follow-ups to r84258Happy-melon2011-03-181-2/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/84279
* Delete all the "API for MediaWiki 1.8+" commentsSam Reed2010-12-221-1/+1
| | | | | | | Add since to ApiQueryQueryPage Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/78829
* Replace my old e-mail address with my new one in API comments. A bit ↵Roan Kattouw2010-12-221-1/+1
| | | | | | | outdated (dropped the old one in September '08) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/78827
* (bug 25174) Add equal sign to boolean parameters in examples, so that the ↵Bryan Tong Minh2010-11-231-1/+1
| | | | | | | examples work immediately when posted Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/77192
* * (bug 25248) API: paraminfo errors with certain modulesSam Reed2010-10-011-1/+5
| | | | | | | Added a needsToken() function, rather than calling getTokenSalt, which can throw silly errors due to dependencies on parameters Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/74098
* Remove some unused variablesSam Reed2010-09-201-2/+0
| | | | | | | Add some braces Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/73377
* Standardised file description headers, added @fileAlexandre Emsenhuber2010-08-071-2/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/70647
* Followup r70461 if PARAM_REQUIRED is set, use for missing param in ↵Sam Reed2010-08-041-2/+0
| | | | | | | | | getPossibleErrors in ApiBase All but ApiQueryBacklinks Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/70474
* Followup to r70460 and r70461: Use true instead of 1X!2010-08-041-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/70462
* Followup to r70460: Committed wrong version of ApiBase.php, convert all core ↵X!2010-08-041-8/+6
| | | | | | | API modules to PARAM_REQUIRED syntax Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/70461
* Remove some unused globalsSam Reed2010-07-221-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/69758
* Correct the address of the FSF in some of the GPL headersDerk-Jan Hartman2010-06-211-1/+1
| | | | | | | 59 Temple Place -> 51 Franklin Street Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/68353
* Fixed a bunch of silly instances of [^!=]==\s*(true|false)Chad Horohoe2010-06-091-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/67707
* Remove arrays from getDescription where we are only using 1 lineSam Reed2010-05-251-3/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/66893
* Mixture of things.Sam Reed2010-05-111-2/+2
| | | | | | | | | | | Couple of class comments Normalisation of "." usage at end of lines (removed) Normalisation of {prefix}parameter as per bug 23461 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/66232
* * Clean up some duplicated code in r64291Mark A. Hershberger2010-04-101-14/+3
| | | | | | | Would've like to refactor the $wgUser->*Watch — but I'm not sure if the hooks that come along with $articleObj->*Watch are ok. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/64852
* Followup r64197Sam Reed2010-03-281-4/+10
| | | | | | | | | | | Return null in getWatchlistValue if no change Fixup unneccessary watch/unwatch calls Remove useless unwatch from ApiUpload Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/64291
* Followup to r64197Sam Reed2010-03-271-1/+1
| | | | | | | | | Remove the mutually exclusive else checks Fix undefined on getWatchlistValue in ApiBase Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/64267
* Fix bug 22944 in a much better fashion (using watchlist parameter)Sam Reed2010-03-251-2/+21
| | | | | | | | | | | Deprecate old watch/unwatch parameters Move generic watchlist stuff to ApiBase/getWatchlistValue (maybe needs renaming better?) Tweak some braces in ApiEditPage Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/64197
* Revert my api changes to pre r64815Sam Reed2010-03-251-10/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/64196
* Add array( 'show' ), to getPossibleErrorsSam Reed2010-03-251-0/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/64190
* Stop mutually exclusive values in ApiProtectSam Reed2010-03-251-0/+4
| | | | | | | Fix fail in Delete, Move, Rollback, Undelete Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/64188
* Part of bug 22944Sam Reed2010-03-251-0/+5
| | | | | | | | | Add unwatch to protect Add unwatch/watch to Rollback and Undelete Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/64184
* API: fix copyright symbol, coding style cleanup, more bracesJack Phoenix2010-02-231-40/+55
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62883
* Refactor requiresToken to getTokenSalt - Returns salt if exists, null if no ↵Sam Reed2010-02-151-6/+2
| | | | | | | | | | | | | 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 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62557
* Start of "Bug 21991 - Move common query parameter (uc, rc) validation, ↵Sam Reed2010-02-141-3/+4
| | | | | | | | | | | | | 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 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62482
* Change layout of the mustBePosted format to standardise itSam Reed2010-02-141-1/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62478
* Fixup spaces to tabs from r62404Sam Reed2010-02-141-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62461
* And an erroneous )Sam Reed2010-02-131-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62408