umherirrender
5c4406d9ea
(bug 28814) add properties to output of action=parse
...
Change-Id: I27cf2daaf6f34596bc34aac230601d5688a0066f
2012-05-05 22:00:45 +02:00
Aaron Schulz
3ae2e2b4ce
Merge "Done a bit of deglobalisation."
2012-05-03 17:43:47 +00:00
Reedy
3e90b8b5ed
Attempt at fixing "Fatal error: Call to a member function getText() on a non-object in /usr/local/apache/common-local/php-1.20wmf1/includes/api/ApiParse.php on line 209"
...
$page->getParserOutput() can apparently return false, so seems a reasonable starting point
Change-Id: I5ee1996f19405d4c854900376a3588fb1b7bbb66
2012-04-28 01:33:24 +01:00
Alex Monk
e02bea0f8b
Done a bit of deglobalisation.
...
Change-Id: Id6e5e18b7bcaecd042528fdb37774a64e439e907
2012-04-24 15:40:37 +01:00
Robin Pepermans
9184dc83d6
Update core usage of getLanguageName[s].
2012-03-08 20:56:26 +00:00
Sam Reed
4655409bf9
* (bug 33865) Exception thrown when using API sandbox action=parse
...
The actual bug is from wrongly using title when the user wanted page, and hence weren't passing any wikitext...
2012-01-21 21:36:07 +00:00
Alexandre Emsenhuber
0eff3f59ad
Pass the User object to Revision::userCan()
2011-12-18 14:07:01 +00:00
Jeroen De Dauw
49cdca93be
add missing deprecation notices and added deprecation version to existing ones
2011-12-13 05:19:05 +00:00
Sam Reed
53000baecf
Oh noes, moar http:// -> https://
2011-11-28 15:43:11 +00:00
Alexandre Emsenhuber
b1bb28c606
* Use ParserOptions::newFromContext() to not depend on $wgUser and $wgLang
...
* Use a WikiPage object instead of Article to get the text or the ParserOutput and create the object directly in getParsedSectionOrText()
* Use Title::getLatestRevID() instead of Article::getRevIdFetched() since the latter will always return the current revision ID when 0 is passed as second parameter to the constructor
* Pass the User object to Revision::getText()
* Removed double setting of $wgTitle
2011-11-18 21:36:57 +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
Alexandre Emsenhuber
da4edaaf40
Call Linker methods statically
2011-09-16 19:35:14 +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
Sam Reed
b85469eceb
Whitespace and comment updates
2011-08-05 16:05:41 +00:00
Sam Reed
492c772fe7
Some annotation for (bug 29907) action=parse only fetches from the parser cache, it does not store to it
2011-08-05 13:07:09 +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
Alexandre Emsenhuber
e78acdc3f1
Reduce a bit the coupling between Skin and OutputPage:
...
* Removed Skin::setupUserCss() and merged it in OutputPage::buildCssLinks() and OutputPage::buildCssLinksArray(), also removed its call from ApiParse.php
* Moved Skin::userCanPreview() to OutputPage since two of the three calls to that function are made from there and the last one in SkinTemplate.php is in a somewhat deprecated function
* Removed the Skin parameter from OutputPage::buildCssLinks(), OutputPage::getHeadScripts(), OutputPage::getBottomScripts() and OutputPage::makeResourceLoaderLink() since we now have a context
Also made ApiParse.php call createContext() instead of create a new RequestContext manually and set its Title so so that it does not rely on $wgRequest and $wgTitle to get that member objects
2011-07-22 10:45:07 +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
Sam Reed
6e84e9ccd9
Followup r92396, add help urls for most of the core (non query) modules
2011-07-17 16:38:24 +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
Alexandre Emsenhuber
ffd52683c8
Create a new RequestContext to use its OutputPage and Skin members instead of messing with global ones
2011-07-08 16:18:31 +00:00
Sam Reed
25ea9b8d95
Replace more multiple calls to $this->getResult() in methods with temporary variable
2011-06-30 01:06:17 +00:00
Sam Reed
f66b26e0a6
* (bug 25133) allow redirects also for action=parse&pageid
2011-06-17 15:57:00 +00:00
Sam Reed
8d38e2a8f5
* (bug 28897) rvparse doesn’t seem to work with rvsection
2011-06-05 16:34:09 +00:00
Happy-melon
295f513e8b
More unpicking of r85288. I think this is all of the magic method calls, but they're very hard to grep for (part of the problem with them!), so let's leave the calls in with a wfDeprecated() for a while...
2011-06-03 11:04:49 +00:00
Sam Reed
92c4ceb6bb
* (bug 28578) API's parse module should not silently override invalid title inputs
2011-05-20 17:19:06 +00:00
Siebrand Mazeland
e065a453f8
Make @deprecated documentation more consistent (see: http://svn.wikimedia.org/doc/deprecated.html ).
2011-05-17 08:46:29 +00:00
Siebrand Mazeland
ba60c6f67e
Suprtfluous whitespace removed.
2011-05-17 08:32:10 +00:00
Bryan Tong Minh
2cc5f4e972
Kill the error suppression operator in the Api
2011-05-15 14:57:10 +00:00
Sam Reed
f903f1ecb0
* (bug 28812) API's parse module documentation should no longer include section tree warning
...
Remove wrong comment
2011-05-04 18:14:30 +00:00
Daniel Friesen
8569cc6203
Drop the $out params I added before I added context to Skin, as well deprecate some of the $out params in other methods.
2011-05-04 10:43:40 +00:00
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