Commit graph

98 commits

Author SHA1 Message Date
Max Semenik
220279a352 Rm all mentions of "this module" in API action descriptions. They are supposed to be read by API users, not MW coders, thus internal terminology shouldn't be used here. 2011-04-25 14:05:57 +00:00
Aaron Schulz
50df1d4794 Quick fix to categoriesHtml() given new skin changes 2011-04-10 06:46:02 +00:00
Happy-melon
625695317e Follow-up r85302: update OutputPage constructors in core. 2011-04-05 00:06:47 +00:00
Krinkle
d3eec98cb7 Set forgotten api parameters types
* (bug 28394) Set forgotten parameters types in ApiUnblock
* (bug 28395) Set forgotten parameters types in ApiParse
2011-04-04 20:51:41 +00:00
Daniel Friesen
86583c7c8f Start better utalizing OutputPage as the focal point for things related to the output of the page. Like getTitle use $out->get{User,Skin} instead of $wgUser and $wgUser->getSkin() for things where the user or skin is being used for output generation back to $out instead of using globals with bad structure. 2011-04-03 03:59:47 +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
13abc68f16 Refactor code a little bit, save doing redundant checks if known not necessary.
Improves flow a little
2011-02-24 23:03:55 +00:00
Platonides
24fa8b42c2 Unused globals 2011-02-08 22:10:34 +00:00
Daniel Friesen
1455b81f0c Kill off Linker::getExternalLinkAttributes. 2011-02-05 23:06:36 +00:00
Daniel Friesen
a605c35109 Followup r81569, kill the wfDeprecated for now till we can actually get rid of the use of languagesHtml. 2011-02-05 20:25:17 +00:00
Daniel Friesen
d77e4ff0c6 Followup comment to r81507. The api is using a legacy langlinks method no modern skin uses. Deprecating this and giving it it's own langlinks generation so that the api will be unaffected by anything we do to legacy skins. 2011-02-05 20:16:42 +00:00
Roan Kattouw
f9942180cb Fix regression in r81124, causing &pst to be ignored for the purposees of actually parsing wikitext 2011-02-02 19:16:05 +00:00
Roan Kattouw
56aa533a61 Implement prop=wikitext in action=parse, (optionally) returning the original wikitext. Requested by some Google folks wanting to get data about a revision in one request. 2011-01-28 01:47:08 +00:00
Roan Kattouw
809ab03c48 Add the resolved URL of each langlink to the API's action=parse output 2011-01-28 01:09:47 +00:00
Sam Reed
aeca05efd6 More tweaks/comments/fixups per r79455
ApiParse is a mess!
2011-01-06 23:35:59 +00:00
Sam Reed
eec8a1c20f Adding some spaces, and some else block comments (due to length or ApiParse [and as such bug 26534] being duplicated and crappy), to help matching and readability 2011-01-06 23:19:19 +00:00
Sam Reed
2fa350deb2 Fix string concat error in r66150. Also was a bug/notice in TW 2011-01-06 22:06:47 +00:00
Sam Reed
7cd5f82d32 Pass 0 as 2nd parameter of an Article Constructor (2 cases) 2011-01-06 17:06:05 +00:00
Sam Reed
ae29df4914 Fix -rakkaus/#mediawiki-i18n- [06-Jan-2011 16:10:59] PHP Notice: Undefined variable: text in /www/w/includes/api/ApiParse.php on line 295 from r79455 2011-01-06 16:24:49 +00:00
Platonides
9a5c36d3c1 Unused global 2011-01-05 23:59:04 +00:00
Sam Reed
359964eafc * (bug 25135) add "normalized" to action=parse
Mov addition of $oldid earlier
2011-01-04 21:37:18 +00:00
Ilmari Karonen
ff0a67c75e make action=parse return a missingtitle error if the page param refers to a missing (rather than just invalid) title 2011-01-03 23:20:13 +00:00
Sam Reed
5b1a5aa763 ApiQueryRevisions: Switch from manual Cache checking, to use $article->getParserOutput()
ApiParse: Fix comment typo
2011-01-02 03:20:45 +00:00
Sam Reed
03ada62815 Add missing $popts parameter, and pass it from r79455 2011-01-01 23:06:04 +00:00
Sam Reed
49c8975c3b Allow section to work with oldid when oldid == currentrevid (worked with older id) 2011-01-01 23:01:24 +00:00
Sam Reed
7d79c3ae7b Per Platonides on CR r75334, use $article->getParserOutput() to get latest revision, rather than doing parser cache stuff ourselves
Helps reduce code duplication too
2011-01-01 22:49:47 +00:00
Sam Reed
d6ca7358f2 Per Nikerabbit on IRC, and Bryan on CR (r79451), change back for ===, and intval( $oldid ) 2011-01-01 22:42:53 +00:00
Sam Reed
80c7f081fb Followup r75334. Change to int == string, rather than int === string (not going to work)
Attempt to load/save an article object, rather than an title object from the parser cache.

Per Bryan, and per bug 26534 now logged, this really needs refactoring more cleanly. As if latestRevId == oldid set, it's doing exactly the same lookup/parse
2011-01-01 22:35:16 +00:00
Sam Reed
1f05665cf3 Styleli[zs]e the API up to date (Been a while since) 2010-12-30 17:06:09 +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
Roan Kattouw
b81ac8ea52 Improve some of the descriptions added in r68482 2010-12-14 11:47:13 +00:00
Priyanka Dhanda
f9cc3b783a Part of fix/workaround to bug 26163. API calls to get language links and categories as html 2010-12-06 18:31:09 +00:00
Sam Reed
cc0574856f Fixup fail from r76191. Thanks Nikerabbit 2010-11-06 16:11:19 +00:00
Sam Reed
84fed26fd4 Add missing credits from r75975
Remove a few unused array keys in API foreach loops

Remove part of Html::Hidden comment
2010-11-06 15:10:18 +00:00
Sam Reed
a14da45336 * If a action=parse request provides an oldid that is actually the current revision id, try the parser cache, and save it to it if necessary 2010-10-24 19:16:46 +00:00
Sam Reed
8b03a013a1 Fix some method documentation
Fix some typos

Some explicit class members
2010-10-20 18:50:33 +00:00
Sam Reed
48a042cbf6 Remove some unneeded whitespace 2010-08-23 22:18:05 +00:00
Alexandre Emsenhuber
457eb73b61 Standardised file description headers, added @file 2010-08-07 19:59:42 +00:00
Sam Reed
8f504f6763 * (bug 24656) API's parse module needs option to disable PP report 2010-08-04 07:44:23 +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
Mark A. Hershberger
e28aaea397 follow up r69339:
* Add a missing setVaryCookie for consistency
* don't cache result when token is given in ApiFeedWatchlist
2010-07-14 21:46:52 +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
Sam Reed
f5c639fd10 Stylize API
Add a few braces
2010-07-06 13:15:59 +00:00
Sam Reed
2d21295243 * (bug 23473) - Give description of properties on all modules
Commit patch by John Du Hart with a few minor tweaks/fixes
2010-06-23 19:36:26 +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
499f972752 Followup to r66873
If title valid, append URL to parse output
2010-05-25 18:37:55 +00:00
Sam Reed
8b3ce85253 Part of bug 23254 - Add interwiki links to parse output 2010-05-25 13:47:22 +00:00
Sam Reed
8f9e12de0e bug 18608 done in a fashion much closer to how I should've done it originally.
Latching onto bug 22061 output

Following up r62195 and r61125
2010-05-24 16:35:23 +00:00