Sam Reed
b18ea7dee2
Normalise casing of getArticleID used in core
2012-03-11 18:54:55 +00:00
Aaron Schulz
5a6559d8b1
Reverted r108743 per CR comment. This should at least be discussed first.
2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b
Kill "* @return void"
2012-01-12 19:12:24 +00:00
Robin Pepermans
be2de16942
update all core usage of deprecated Title::userCanRead()
2011-12-13 11:05:30 +00:00
Sam Reed
53000baecf
Oh noes, moar http:// -> https://
2011-11-28 15:43:11 +00:00
John Du Hart
2e7d867478
Removed the 'eclipse helper' bit on top of every API module
...
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.
2011-11-16 00:17:26 +00:00
Sam Reed
1ba364df99
Update documentation
...
Fix some context method calls which were considered deprecated
2011-10-28 18:10:41 +00:00
Sam Reed
fa65fa3243
Documentation
...
Deprecated code updates
2011-10-27 00:46:17 +00:00
John Du Hart
40f19e6def
Adding context to the API
...
This will probably break something somewhere so when it does please yell at me on IRC and I'll fix it.
2011-10-26 23:27:01 +00:00
Roan Kattouw
d8a2733757
Make the PROTO_ parameter to wfExpandUrl() explicit in all calls. There are now no calls to wfExpandUrl() in core that rely on PROTO_CURRENT being the default. Also switch to using getCanonicalUrl() for.... rel="canonical" :D (I picked the right name, I KNEW IT)
2011-08-19 15:46:08 +00:00
Sam Reed
a5628f5734
Based on diff to wikia, set more functions consistently public rather than protected
2011-08-17 22:24:21 +00:00
Roan Kattouw
fbdba8b26f
Revert r93802 per CR. Will avoid cache pollution by splitting the cache instead
2011-08-03 07:54:23 +00:00
Roan Kattouw
541aa4cbdd
Followup r92044: force HTTP on URLs output by the API, now that wfExpandUrl() has a flag for this
2011-08-03 07:05:21 +00:00
Sam Reed
d5e46f9614
Followup r92396
...
More modules documented, pretty much only action=query&list= to be done (ie links added where documentation pages exist already)
2011-07-17 16:51:11 +00:00
Roan Kattouw
7b8b23e8b4
Per wikitech-l, run a bunch of URLs in the API output through wfExpandUrl(), so they become fully-qualified even if they were originally protocol-relative
2011-07-13 01:27:07 +00:00
Sam Reed
d993a1578c
* (bug 29070) Add token to action=watch
2011-05-21 16:38:40 +00:00
Sam Reed
f373e63255
Followup r84825
...
Allow obtaining of an import token if users have the importupload right
2011-04-01 17:29:15 +00:00
Happy-melon
91e7b5a93c
More cleanup in Block.php. Push Block::encodeExpiry() and Block::decodeExpiry() deeper into the callstack, to DatabaseBase for encode and Language for decode. The vast majority of callers of these functions are not handling block expiries, but expiries generally, particularly page protections.
2011-03-18 19:15:56 +00:00
Sam Reed
27ca6b2fa8
Tweak comments, remove some unused stuff.
...
Explicit definitions, move a few minor bits around
2011-02-27 21:10:11 +00:00
Sam Reed
fa64025161
More parameter documentation
2011-02-19 00:30:18 +00:00
Sam Reed
6309c920dd
Delete all the "API for MediaWiki 1.8+" comments
...
Add since to ApiQueryQueryPage
2010-12-22 20:52:06 +00:00
Bryan Tong Minh
b97ce8c015
Revert the addition of the patrol token from ApiQueryInfo from r78141; does not belong there
2010-12-09 21:42:01 +00:00
Bryan Tong Minh
27b998755c
BREAKING CHANGE: Require POST for patrolling revisions and salt the patrol token with 'patrol' instead of rc_id.
...
See my comments on r75274, for which this is a follow-up. Using a dedicated, but constant patrol token is in my opinion the optimal compromise between performance (only require fetching the token once) and security (leaking the token will only compromise the patrolling feature).
2010-12-09 21:29:03 +00:00
Alexandre Emsenhuber
00226e1e9b
* (bug 25987) prop=info&inprop=watched now also works for missing pages
2010-11-19 10:53:08 +00:00
Sam Reed
9826f4a7df
Followup r75999, use the correct variable. Zak confused me with having one thing in the bug title, and another in the bug content! :P
2010-11-05 22:24:07 +00:00
Sam Reed
1d0acc5fb4
Fixup r75999, add missing ./PhpStorm-98.240/bin/webide.sh Wheee r76000
2010-11-04 13:20:58 +00:00
Sam Reed
bfd1fd770a
* (bug 25760) counter property still reported by the API when wgDisableCounters enabled. If it's enabled, don't request counter information, and just display , to avoid breaking any backwards compatability
2010-11-04 13:10:38 +00:00
Sam Reed
4a0c3d8ff5
Comment return types, some explicit class variable declaration
2010-10-09 00:01:45 +00:00
Alexandre Emsenhuber
457eb73b61
Standardised file description headers, added @file
2010-08-07 19:59:42 +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
Tim Starling
b2dc451c82
Rewrote r69339 etc. to clean up API cache header handling.
...
* Introduced a "cache mode" concept to simplify the header generation code, and to avoid odd results when conflicting cache header requests are received from submodules, or at least to formalise the handling of such cases.
* Made the cache mode private by default, so that code written in ignorance of caching tends to be safe. If different query modules are used in a single request, private caching is preferred over public caching.
* Removed the "must-revalidate" option from all CC headers, this is really specific to page views with a hacked squid in front, I don't think it's applicable here.
* Made the watchlist module private. This is really the definition of private data. There's nothing in the HTTP spec that says the URL for a CC:public request is private and can't be leaked. CC:private provides protection against unknown proxy behaviour.
* In ApiQueryAllmessages: avoid calling $wgLang->getCode() to check if it's necessary to make a new $wgLang when lang= is specified, since this is the only thing that unstubs $wgUser.
* Removed "FIXME: should this check $user instead of $wgUser?" Answer is no.
2010-07-23 07:17:56 +00:00
Sam Reed
8f1d2cb199
Big blitz on unused variables (a lot of $db = $this->getDb() )
2010-07-22 22:13:21 +00:00
Sam Reed
83f8b93bd7
Fixup r69719 per comments
2010-07-22 10:18:41 +00:00
Sam Reed
1cfab244fc
Followup r69719 r66716, add variable definition to false
...
Per -rakkaus/#mediawiki-i18n- [22-Jul-2010 09:44:40] PHP Notice: Undefined property: ApiQueryInfo::$fld_displaytitle in /www/w/includes/api/ApiQueryInfo.php on line 266
2010-07-22 09:47:46 +00:00
Sam Reed
65ae4eed55
(bug 23936) - Add "displaytitle" to query/info API
...
Complete usage of accidental code from r69716
Move a $db = $this->getDB to after check in getTSIDs
2010-07-22 08:48:34 +00:00
Sam Reed
c0acaca806
Fix bug from r61759
...
Assign $text = null; before using it in a hook call
2010-07-22 07:00:38 +00:00
Roan Kattouw
70824ccccc
API: Make output containing private or user-specific data uncacheable for logged-in users by setting Vary: Cookie or Cache-Control: private, whichever is appropriate. Fixes instances in core and WMF-deployed extensions only. Without this change, the output of requests like ?action=query&list=recentchanges&rcprop=patrolled&smaxage=3600 would be cached in Squid and viewable for anyone using the same URL, even if they don't have patrol rights. Other, more serious exploits are also possible. Also avoid using $wgUser in one place, kill some unused global $wgUser; instances and tweak a comment.
2010-07-14 19:00:54 +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
Sam Reed
faf34b4073
Per http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66168#c7252 switch while ( $row = $db->fectchObject( $res ) ) to foreach ( $res as row )
...
On ApiQueryUsers switch $r to row, and remove nested brackets
2010-06-20 18:48:34 +00:00
Sam Reed
a90a0783de
Nuke $db->freeResult() from Api stuffs
2010-06-20 17:48:21 +00:00
Sam Reed
75449ee41b
Move some braces
...
Add some to a for loop
2010-06-13 01:23:12 +00:00
Jack Phoenix
eba6c94002
API: fix copyright symbol, coding style cleanup, more braces
2010-02-24 14:45:19 +00:00
Sam Reed
40dd0530f9
Stylize API files
2010-02-13 01:41:37 +00:00
Sam Reed
fc46b81e3f
4 More dieUsage calls
...
Bar some from ApiBase.. These are done..
2010-02-13 01:38:12 +00:00
Sam Reed
affac2406a
* (bug 20809) Expose EditFormPreloadText via the API
...
If page exists, don't run hook and just display ''
Comment for readable and url
2010-01-31 22:06:02 +00:00
Sam Reed
b15f2c8c46
Normalise comment usage (# --> //)
2010-01-23 22:52:40 +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
Roan Kattouw
455bb78b12
API: Minor cleanup for r59258, general whitespace cleanup
2009-12-02 12:28:27 +00:00