aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryLangLinks.php
Commit message (Collapse)AuthorAgeFilesLines
* Re-instate most of the revisions for bug 33147 "API examples should explain ↵Sam Reed2011-12-271-2/+1
| | | | | | | | | | | what they do" Using this to sync up my working copies Should have the little niggles tidied up though Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/107393
* Revert r106439, r106441 - bad formatting mushing separate lines togetherBrion Vibber2011-12-201-1/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106879
* Convert a few more descriptionsSam Reed2011-12-161-2/+1
| | | | | | | Ping r106439 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106441
* 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
* (bug 26909) Add dir parameter for prop= API modules. Modified patch by ↵Roan Kattouw2011-11-141-4/+19
| | | | | | | Umherirrender Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/102947
* Make the PROTO_ parameter to wfExpandUrl() explicit in all calls. There are ↵Roan Kattouw2011-08-191-1/+1
| | | | | | | 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) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/95010
* 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
* Revert r93802 per CR. Will avoid cache pollution by splitting the cache insteadRoan Kattouw2011-08-031-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93806
* Followup r92044: force HTTP on URLs output by the API, now that ↵Roan Kattouw2011-08-031-1/+1
| | | | | | | wfExpandUrl() has a flag for this Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93802
* Followup r92396Sam Reed2011-07-171-0/+4
| | | | | | | More modules documented, pretty much only action=query&list= to be done (ie links added where documentation pages exist already) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/92400
* Per wikitech-l, run a bunch of URLs in the API output through wfExpandUrl(), ↵Roan Kattouw2011-07-131-1/+1
| | | | | | | so they become fully-qualified even if they were originally protocol-relative Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/92044
* * (bug 26484) add a lltitles param to prop=langlinksSam Reed2011-01-051-4/+25
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79672
* 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
* Followup r77072: declare llurl as a boolean parameter.Roan Kattouw2010-12-031-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/77660
* (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
* Per Reedy, follow-up to r77072: don't use array_merge() to add just one itemAlexandre Emsenhuber2010-11-211-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/77079
* * (bug 26006) prop=langlinks now allows obtaining full URLAlexandre Emsenhuber2010-11-211-0/+8
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/77072
* Standardised file description headers, added @fileAlexandre Emsenhuber2010-08-071-3/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/70647
* Rewrote r69339 etc. to clean up API cache header handling.Tim Starling2010-07-231-1/+5
| | | | | | | | | | | | * 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. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/69776
* Big blitz on unused variables (a lot of $db = $this->getDb() )Sam Reed2010-07-221-1/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/69761
* 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
* Per http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66168#c7252 switch ↵Sam Reed2010-06-201-1/+1
| | | | | | | | | while ( $row = $db->fectchObject( $res ) ) to foreach ( $res as row ) On ApiQueryUsers switch $r to row, and remove nested brackets Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/68337
* Nuke $db->freeResult() from Api stuffsSam Reed2010-06-201-1/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/68332
* API: fix copyright symbol, coding style cleanup, more bracesJack Phoenix2010-02-241-31/+35
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62920
* 4 More dieUsage callsSam Reed2010-02-131-0/+6
| | | | | | | Bar some from ApiBase.. These are done.. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62414
* Normalise comment usage (# --> //)Sam Reed2010-01-231-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/61444
* Add/remove whitelines to increase readability in API code filesSam Reed2010-01-231-0/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/61437
* stylize.php on API codeAryeh Gregor2010-01-111-32/+32
| | | | | | | | | | | | "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. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/60930
* * API: BREAKING CHANGE: (bug 11430) Return fewer results than the limit in ↵Roan Kattouw2009-02-051-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some cases to prevent running out of memory * This means queries could possibly return fewer results than the limit and still set a query-continue * Add iicontinue, rvcontinue, cicontinue, incontinue, amfrom to faciliate query-continue for these modules * Implemented by blocking additions to the ApiResult object if they would make it too large ** Important things like query-continue values and warnings are exempt from this check ** RSS feeds and exported XML are also exempted (size-checking them would be too messy) ** Result size is checked against $wgAPIMaxResultSize, which defaults to 8 MB For those who really care, per-file details follow: ApiResult.php: * Introduced ApiResult::$mSize which keeps track of the result size. * Introduced ApiResult::size() which calculates an array's size (which is the sum of the strlen()s of its elements). * ApiResult::addValue() now checks that the result size stays below $wgAPIMaxResultSize. If the item won't fit, it won't be added and addValue() will return false. Callers should check the return value and set a query-continue if it's false. * Closed the back door that is ApiResult::getData(): callers can't manipulate the data array directly anymore so they can't bypass the result size limit. * Added ApiResult::setIndexedTagName_internal() which will call setIndexedTagName() on an array already in the result. This is needed for the 'new' order of adding results, which means addValue()ing one result at a time until you hit the limit or run out, then calling this function to set the tag name. * Added ApiResult::disableSizeCheck() and enableSizeCheck() which disable and enable size checking in addValue(). This is used for stuff like query-continue elements and warnings which shouldn't count towards the result size. * Added ApiResult::unsetValue() which removes an element from the result and decreases $mSize. ApiBase.php: * Like ApiResult::getData(), ApiBase::getResultData() no longer returns a reference. * Use ApiResult::disableSizeCheck() in ApiBase::setWarning() ApiQueryBase.php: * Added ApiQueryBase::addPageSubItem(), which adds page subitems one item at a time. * addPageSubItem() and addPageSubItems() now return whether the subitem fit in the result. * Use ApiResult::disableSizeCheck() in setContinueEnumParameter() ApiMain.php: * Use ApiResult::disableSizeCheck() in ApiMain::substituteResultWithError() * Use getParameter() rather than $mRequest to obtain requestid DefaultSettings.php: * Added $wgAPIMaxResultSize, with a default value of 8 MB ApiQuery*.php: * Added results one at a time, and set a query-continue if the result is full. ApiQueryLangLinks.php and friends: * Migrated from addPageSubItems() to addPageSubItem(). This eliminates the need for $lastId. ApiQueryAllLinks.php, ApiQueryWatchlist.php, ApiQueryAllimages.php, ApiQuerySearch.php: * Renamed $data to something more appropriate ($pageids, $ids or $titles) ApiQuerySiteinfo.php: * Abuse siprop as a query-continue parameter and set it to all props that couldn't be processed. ApiQueryRandom.php: * Doesn't do continuations, because the result is supposed to be random. * Be smart enough to not run the second query if the results of the first didn't fit. ApiQueryImageInfo.php, ApiQueryRevisions.php, ApiQueryCategoryInfo.php, ApiQueryInfo.php: * Added continue parameter which basically skips the first so many items ApiQueryBacklinks.php: * Throw the result in a big array first and addValue() that one element at a time if necessary ** This is necessary because the results aren't retrieved in order * Introduced $this->pageMap to map namespace and title to page ID * Rewritten extractRowInfo() and extractRedirRowInfo() a little * Declared all private member variables explicitly ApiQueryDeletedrevs.php: * Use a pagemap just like in Backlinks * Introduce fake page IDs and keep track of them so we know where to add what ** This doesn't change the output format, because the fake page IDs start at 0 and are consecutive ApiQueryAllmessages.php: * Add amfrom to facilitate query-continue ApiQueryUsers.php: * Rewrite: put the getOtherUsersInfo() code in execute() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/46845
* Consistent casing for wfGetDB(), getDB(), and getDBKey()Siebrand Mazeland2008-11-061-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/43271
* Partial revert of r37502, 37503: double-quoting of SQL stringsBrion Vibber2008-07-101-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/37534
* Forgot to change one strencode() to addQuotes()Roan Kattouw2008-07-101-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/37503
* API: Add paging (i.e. limit and continue) parameters to ↵Roan Kattouw2008-07-071-3/+46
| | | | | | | prop={links,templatelinks,langlinks,extlinks,categories,images}. This means that these modules will no longer request data from the database without a LIMIT, and that clients will have to use the query-continue method to get all the results. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/37270
* WARNING: HUGE COMMITAlexandre Emsenhuber2008-05-201-1/+1
| | | | | | | | | | | | | | | | | | 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. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/35098
* * remove end of line whitespaceSiebrand Mazeland2008-04-141-4/+3
| | | | | | | | * remove empty lines at end of file * remove "?>" where still present Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/33276
* Missing pages in prop=langlinks and prop=extlinks are now handled properly. ↵Bryan Tong Minh2008-03-201-0/+3
| | | | | | | (bug 13442) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/32236
* API: Changing all modules' getParamDescription(), getAllowedParams() and ↵Roan Kattouw2008-01-281-1/+1
| | | | | | | 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?) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/30222
* Revert r28215: incorrectly moved filesVictor Vasiliev2007-12-061-0/+94
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/28216
* Create includes/api/query for Query API and includes/api/edit for Edit APIVictor Vasiliev2007-12-061-94/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/28215
* API: implemented prop=imageinfo, minor cleanupYuri Astrakhan2007-07-071-8/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/23819
* Remove ?>'s from files. They're pointless, and just asking for people to ↵Aryeh Gregor2007-06-291-1/+1
| | | | | | | mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/23531
* API: documentation and cleanup.Yuri Astrakhan2007-05-201-1/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/22289
* * New properties: links, templates, images, langlinksYuri Astrakhan2007-05-141-0/+100
* Breaking Change: imagelinks renamed into imageusage (il->iu) * Bug fix: incorrect generator behavior in some cases Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/22158