Commit graph

73 commits

Author SHA1 Message Date
Roan Kattouw
4a07250372 (bug 28952) Add tofragment to the redirect resolution info.
Changes the format of ApiPageSet::getRedirectTitles() from returning prefixed text strings to returning title objects so we can obtain the fragment info
2011-05-14 12:48:07 +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
c4b687dc98 initFromQueryResult doesn't use the $db parameter.
Private method, updated callers to not pass it.
2011-01-12 00:24:25 +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
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
8b03a013a1 Fix some method documentation
Fix some typos

Some explicit class members
2010-10-20 18:50:33 +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
Roan Kattouw
1caa70df2a Followup to r69587: forgot to hit Save *facepalm* 2010-07-20 09:26:56 +00:00
Bryan Tong Minh
1162995b21 (bug 24296) Added converttitles parameter to convert titles to their canonical language variant. 2010-07-10 11:53:22 +00:00
Bryan Tong Minh
3f3465126a (bug 24185) Titles in the Media and Special namespace are now supported for title normalization in action=query. Special pages have their name resolved to the local alias. 2010-07-10 10:46:20 +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
0769301e87 Stylize Api upto date 2010-04-17 20:58:04 +00:00
Jack Phoenix
c286869e38 API: fix copyright symbol, coding style cleanup, more braces 2010-02-23 18:05:46 +00:00
Sam Reed
d299fc6a55 Complete dieUsage errors in 7 more Api files 2010-02-13 01:21:52 +00:00
Sam Reed
b15f2c8c46 Normalise comment usage (# --> //) 2010-01-23 22:52:40 +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
Andrew Garrett
f629ef2584 Fix logic error from bad casing 2009-02-18 05:29:11 +00:00
Roan Kattouw
2755b38a45 API: Remove stray $options = array(); from ApiPageSet
Previous commit message didn't mention changing ApiQueryInfo to sort $titles by page ID and to add info about missing pages in one go (the latter upon Brad Jorsch's suggestion)
2009-02-11 19:28:07 +00:00
Roan Kattouw
fdb926bca4 * API: Add documentation to important API classes
* Move page_is_redirect up in ApiPageSet::getPageTableFields()
2009-02-11 19:25:25 +00:00
Roan Kattouw
167d11a8c3 * API: Listing (semi-)deleted revisions and log entries (with rev_/log_deleted != 0) as well in prop=revisions and list=logevents, with commenthidden/userhidden/actionhidden/texthidden flags where appropriate
* Still honors the paranoia checks added in r46807
* Use $index consistently in ApiQueryLogEvents
* Some whitespace consistency
2009-02-05 11:44:10 +00:00
Aryeh Gregor
7091024181 s/existant/existent/ 2009-01-01 02:02:03 +00:00
Roan Kattouw
8504bf43e2 API: Crusade against extract(). Left one extract() call alone in ApiQueryBacklinks.php because I don't have a better alternative for it. 2008-12-17 16:34:01 +00:00
Roan Kattouw
684a4c3fb7 API: (bug 16549) Kill a filesort in list=allpages&apfilterlanglinks=withlanglinks by replacing DISTINCT with GROUP BY. Of course GROUP BY page_namespace, page_title would suffice on MySQL, but Postgres will reportedly whine about that being against the SQL standard. Using GROUP BY on all selected fields instead (should please pgsql) and taking care that page_namespace, page_title is on front, which shouldn't cause a filesort is MySQL is smart enough (5.0 is, let's just hope 4.1 is too) 2008-12-14 17:04:24 +00:00
Aaron Schulz
eef0d25777 Don't show orphaned revisions (will matter for bug 11402 later) 2008-10-29 04:17:31 +00:00
Roan Kattouw
2c4eae4b92 API: (bug 16158) Generators choke on pagelinks entries with negative pl_namespace. Throw a warning instead of an error for the time being 2008-10-28 14:35:48 +00:00
Tim Starling
f48c6070df Removed all instances of empty() where error suppression was not intended. Replaced with conversion to boolean, count() or empty string check as appropriate. Fixes a number of bugs due to incorrect conversion to boolean: suppressed edit summaries containing '0', ignored titles called '0', searches for '0' ignored, etc. 2008-10-25 14:04:43 +00:00
Roan Kattouw
fe833aeddc (bug 15228) Throw a warning instead of an error when revids= and redirects are combined. Also fixed a bug that caused warnings thrown in ApiPageSet.php to appear in an <ApiPageSet> tag rather than <query> 2008-08-18 20:48:45 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
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.
2008-05-20 17:13:28 +00:00
Roan Kattouw
72b793a695 Remove deprecated ApiMain::scheduleCommit() 2008-05-18 20:15:56 +00:00
Aaron Schulz
ff9f01a469 E_STRICT 2008-05-13 21:03:57 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Roan Kattouw
68bbfc12c0 Committing patch for bug 10931, which also fixes bug 13651. For a detailed explanation of what this commit does, see bug 10931 comment #24 2008-04-11 15:20:45 +00:00
Roan Kattouw
f49b53df46 API:
* Cleaned up ApiPageSet::getRedirectTargets(), now uses the redirect table rather than the pagelinks table (this fixes bug 13965)
* Added possibility to obtain all external links through list=exturlusage (per MinuteElectron's request on the mediawiki-api list)
2008-04-04 11:22:58 +00:00
Roan Kattouw
16c8552437 (bug 13390) Invalid title no longer kills an entire API query 2008-03-18 15:17:24 +00:00
Nick Jenkins
68dc063316 Variable $titleString seemed to be used before it was defined - removing. 2007-08-20 08:13:16 +00:00
Yuri Astrakhan
8ca133afff API: Big change: Removed all userCanRead() checks per IRC discussion. Only rvprop=content will now check that the page can be read. 2007-07-14 19:04:31 +00:00
Yuri Astrakhan
9afb42f99c API:
* added link enumeration (list=alllinks)
* marked potential security vulnerability
2007-07-08 03:35:37 +00:00
Yuri Astrakhan
f5aa2e8018 API: implemented prop=imageinfo, minor cleanup 2007-07-07 03:05:09 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to 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.) 2007-06-29 01:19:14 +00:00
Yuri Astrakhan
15ae5ecbf4 API: fixed bug 10147 Silent normalization of interwiki titles 2007-06-14 03:14:44 +00:00
Yuri Astrakhan
cb38c11c84 API: documentation and cleanup. 2007-05-20 23:31:44 +00:00
Yuri Astrakhan
d732def31e API: fixed bug in categories: error when no valid titles are given 2007-05-19 23:54:22 +00:00
Yuri Astrakhan
0e68016b72 * New properties: links, templates, images, langlinks
* Breaking Change: imagelinks renamed into imageusage (il->iu)
* Bug fix: incorrect generator behavior in some cases
2007-05-14 05:28:06 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Nick Jenkins
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00
Tim Starling
b1cd1b035c Fixed inefficient use of array_keys() introduced by Nick in r17880. If this is setting off alarms, then fix the alarms. 2006-11-25 17:11:58 +00:00