Commit graph

140 commits

Author SHA1 Message Date
Marius Hoch
76eb53053e Minor fixes to User and ApiQueryUsers
I've fixed several PHP notices and the problem that rights returned
by User::getRights() might have duplicates if altered by a hook
(same for User::getEffectiveGroups).

Change-Id: Id92af387d8c09414076bac40e83052cd6f913f42
2012-11-09 22:23:14 +01:00
Hoo man
d05ddf6e06 Make action=query&list=users use User::getRights()
Made action=query&list=users use User::getRights() if
usprop rights given. This not only removes redundant
code, but makes it execute the UserGetRights hook, so
that this now includes rights given by Extensions (eg.
CentralAuth does that).

Patch Set 2: Modified the User class to be able to
inject further data into User::newFromRow() and using
that to inject the groups taken out of one SQL query
(for performance reasons). Furthermore I've split up
the query in ApiQueryUsers.php into one for user data
and one for the groups, to only have one row for each
user.
After all the perfomance of this should now be ok, not
extremly good, but bearable (though I couldn't test it
deeply, as I don't have much data in my CentralAuth
environment).

Change-Id: Ie5b2924abb82ac254c77e1d04cc4d5b308962dad
2012-10-24 20:16:06 -07:00
Alexandre Emsenhuber
1e8992ca74 Follow-up I0b781c11 (2a55449): use User::getAutomaticGroups().
No need to duplicate the code of User::getAutomaticGroups() in
ApiQueryUsers::getAutoGroups(), instead just call that method
directly.
Also deprecated the latter in favour of the former and replaced
all calls in core.

Change-Id: I224cb610cbd6a927a4c7f7137951416368f8cb5d
2012-08-03 21:41:44 +02:00
Catrope
2a55449257 Fix bug causing API to list anons as autoconfirmed in certain cases
On a stock install, the autoconfirmed requirements default to zero, so
anons qualify for autoconfirmed. They don't actually get it because
User::getEffectiveGroups() only checks for autopromote groups for
logged-in users. However, ApiQueryUsers::getAutoGroups() (which
duplicates this logic for some reason) didn't use the same rule and
applied autopromote groups to anons too, which caused discrepancies
betwen the API output and wgUserGroups.

Krinkle noticed this because a QUnit test for mw.user.getGroups() was
failing while logged out: the API response included autoconfirmed but
wgUserGroups didn't.

Change-Id: I0b781c11e06d3cc7176b2fb3ba06979d3637f970
2012-08-02 13:48:49 -07:00
Antoine Musso
4f5d2386f3 escape HTML elements in docblock with double quotes
Doxygen choke on text enclosed by '<' and '>' since it tries to
interpret them as HTML or XML elements. This patch adds double quotes
in includes/api/*.php files around the two following strings:

 <Firstname>.<Lastname>@gmail.com
 <Firstname><Lastname>@gmail.com

Which becomes:

 "<Firstname>.<Lastname>@gmail.com"
 "<Firstname><Lastname>@gmail.com"

Tested locally, it prevents doxygen 1.8.0 related warnings.

Change-Id: I36d82eb3fd4989ee3ffc65b0b527b83711d1ba69
2012-07-15 22:15:45 +02:00
Petr Onderka
80aa025528 Added result properties to action=paraminfo
Added information about the properties of the results of API calls
to action=paraminfo, including information about "property groups":
what should the prop parameter be set to to get that property.

Uses the same format for types as parameters already do.
The output format of some modules doesn't fit this, so the result
properties for them weren't added, or only partially.

Partially implemented modules:
* expandtemplates:
  parsetree is in its own tag
* protect, allusers, backlinks, deletedrevs, info, imageinfo,
  logevents, querypage, recentchanges, revisions, searchinfo,
  usercontribs, userinfo, users, watchlist, upload:
  response with partially complex structure

Not implemented modules:
* feedcontributions, feedwatchlist, opensearch, rds:
  non-standard reponse
* help:
  error is normal response; not very useful for automated tools anyway
* paraminfo, parse, pageprops, siteinfo, userrights:
  response with complex structure

Change-Id: Iff2a9bef79f994e73eef3062b4dd5461bff968ab
2012-06-06 19:24:59 +02:00
umherirrender
2f190c4792 user table: replace some '*' with explicit fields in selects
It is good practice to select only fields, which are used later

Change-Id: Iaaa252d594112894334a8ee9916007352d5bc4e7
2012-05-25 17:53:29 +02:00
Reedy
c87a63935a Merge "(bug 19195) Make user IDs more readily available with the API" 2012-05-10 18:47:42 +00:00
Petr Onderka
4f17f49b78 Fixed whitespace in API classes
Change-Id: Ia06de4822e32612c4f668e14643236322837a3e1
2012-05-02 15:48:02 +02:00
umherirrender
426ccbf42e (bug 19195) Make user IDs more readily available with the API
Add some block ids and user ids to the result of some modules

Change-Id: If50604b888a54827eddde76574e779db6c7263ec
2012-04-22 14:20:46 +02: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
fa65fa3243 Documentation
Deprecated code updates
2011-10-27 00:46:17 +00:00
Sam Reed
5ed71b715e Bug 31199 - Fix notification of implicit groups so it doesn't massively change json output
Needs merging to 1.18, 1.18wmf1 and pushing to site
2011-09-28 16:36:17 +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
d510cdd91d * (bug 29938) list=users&usprop=rights shows rights the user doesn't have 2011-07-18 21:26:33 +00:00
Sam Reed
9c37ab4fb3 * (bug 28817) Add reference help page link to API Modules
Last followup of r92396

Should be all modules with documentation pages in core now documented...
2011-07-17 17:02:06 +00:00
Chad Horohoe
783d4e0862 Remove @static from all over the place. That's what the static keyword is for, this being PHP5 and all 2011-04-21 00:07:09 +00:00
Sam Reed
29df5af44e Followup r84361, numerical keys ftw 2011-03-20 00:32:28 +00:00
Sam Reed
db45168a0d * (bug 27469) label implicit groups in list=allusers&auprop=groups/list=users&usprop=groups 2011-03-20 00:19:29 +00:00
Sam Reed
86ce74c75d * (bug 28010) Passing a non existant user to list=users gives internal error
* (bug 27549) action=query&list=users&usprop=groups doesn't show implicit groups if a user doesn't have explicit groups

Also follows up r79556, where I'd done a couple of daft things... (accessing undefined objects)
2011-03-12 22:23:43 +00:00
Sam Reed
aea7a5a482 Followup r83390
If the user is allowed to view hidden users, put a missing property on all users.

For list=users, do the same, but we can't easily distinguish to other people the difference between "hidden", or "missing", so no reason to do it
2011-03-06 20:51:31 +00:00
Sam Reed
8c4f349a63 Fix leading whitespace before class ApiQueryUsers 2011-03-06 18:17:28 +00:00
Sam Reed
67d4ee1d26 Followup r83390, change cache modes 2011-03-06 18:16:44 +00:00
Sam Reed
c488abeeb8 * (bug 27897) list=allusers and list=users list hidden users
Refactored addition of block information, and also checked if user is allowed to view hidden user fields
2011-03-06 17:59:08 +00:00
Sam Reed
20d56c63b3 * (bug 27708) list=users does not have a property to return user id
Add userid to ApiQueryUsers

Move userid in ApiQueryAllUsers before name
2011-02-25 16:19:44 +00:00
Sam Reed
448ab3b78d Fixup one missed alias rename from r82739 2011-02-24 20:46:45 +00:00
Sam Reed
35296f391f Followup to r82739 (bug 27688)
Remove u1 table aliases
2011-02-24 18:46:12 +00:00
Sam Reed
57923b31fa * (bug 27688) Simplify queries to list user block information
Also expose block expiry information, listed on Users, but not all users

Some minor simplifications to come
2011-02-24 18:43:44 +00:00
Sam Reed
fa64025161 More parameter documentation 2011-02-19 00:30:18 +00:00
Sam Reed
df0a765cfe * (bug 26559) list=allusers auprop=rights does not match list=users usprop=rights 2011-01-04 03:36:39 +00:00
Sam Reed
0014c1113c * (bug 26558) list=allusers auprop=groups does not list groups a user is automatically a member of 2011-01-04 02:48:02 +00:00
Sam Reed
e1bcab1ab8 * (bug 25767) Add userrights properties to allusers and users query lists
First part of this bug. Listing of all rights that users have
2011-01-04 01:39:02 +00:00
Sam Reed
1da2cd2dde Move comment about groups potentially returning less results from server.
Comment out description line about rights from ApiQueryUsers, as that prop doesn't exist (Might do in future. Possible artifact from large scale comment addition?)
2011-01-03 20:41:22 +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
17487e40ba Replace my old e-mail address with my new one in API comments. A bit outdated (dropped the old one in September '08) 2010-12-22 20:48:10 +00:00
Sam Reed
15b65258d1 Spaces to tab, add a couple of braces 2010-11-23 23:58:57 +00:00
Sam Reed
38f9c25b27 Explicit variable definition, tweak documentation 2010-11-23 21:43:56 +00:00
Sam Reed
4aaecdcd9d * (bug 26089) add block expiration to blockinfo 2010-11-23 21:37:27 +00:00
Sam Reed
68e1a821f4 Capitalise first letters 2010-11-04 13:07:57 +00:00
Sam Reed
550271e806 Explicit class variable definition
Parameter hints
2010-10-06 21:18:55 +00:00
Sam Reed
f07567201f Remove some unused variables
Tweak php doc, "One" is not a type, so insert string in there
2010-09-25 16:37:39 +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
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
0e2576a250 Fix typo (and change wrong variable) 2010-06-22 06:05: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
232cabd9f8 Followup r68157 and r68161 per Bryans comment (anons aren't in the group user) 2010-06-20 17:30:23 +00:00
Roan Kattouw
a1db76daaf Followup to r68157: simplify ApiQueryUsers::getAutoGroups() 2010-06-17 09:39:07 +00:00
Sam Reed
a5054efc97 Rem whitespace, function comment for r68158 2010-06-17 08:15:56 +00:00
Sam Reed
18227749a6 Minor followup to r68156, add "user" as implicit group
Refactor out and reuse in ApiQueryUserInfo

Add couple more braces to SpecialUserrights
2010-06-17 08:00:42 +00:00
Sam Reed
a19c0eb2a3 * (bug 24009) Include implicit groups in action=query&list=users&usprop=groups
Add some whitespace, fix some braces in ApiQueryUsers

Add a few braces to SpecialUserrights.php, change or to || and and to &&
2010-06-17 07:39:31 +00:00
Jack Phoenix
7ced9bc569 API: fix copyright symbol, coding style cleanup, more braces 2010-02-26 13:18:56 +00:00
Sam Reed
47c24175d3 Add/remove whitelines to increase readability in API code files 2010-01-23 22:26: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
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Alex Z
68596ac79c merge most of r56515 back to trunk (changing UserrightsPage::fetchUser to non-static)
Fixing ApiQueryUsers so it should work properly for interwiki users
2009-09-17 16:21:27 +00:00
Roan Kattouw
9e78c71b1e API: Make it possible to fetch userrights tokens for interwiki users; make UserrightsPage::fetchUser() static 2009-09-10 13:44:49 +00:00
Tim Starling
ecaa39d51b Followup to r49056: gender property gives "unknown" when gender option is null 2009-06-03 15:36:44 +00:00
X!
e774395b54 Added usprop=gender to list=users 2009-03-31 03:48:08 +00:00
Roan Kattouw
549b1688cc Redo r48746 (API userrights, reverted in r48909 and r48910) in a way that doesn't break CentralAuth. Basically, this works around PHP's inability (at least in < 5.3) to override static methods by adding a hook. Changes to CentralAuth in next commit. 2009-03-28 19:08:47 +00:00
Andrew Garrett
d4d0329547 Revert r48746 (API userrights). Breaks Special:GlobalGroupMembership by changing overridden methods to static methods, which cannot be overridden. Also reverts r48747, r48814, r48778, r48775 2009-03-27 05:59:42 +00:00
Roan Kattouw
3c52c2c64b * API: (bug 15935) Add action=userrights to the API
* Add ustoken=userrights to list=users
* Move the non-UI part of UserrightsPage::saveUserGroups() to the static and more generic doSaveUserGroups()
* Add a $reason parameter to UserrightsPage::addLogEntry() and make it and its helpers static
* Move UserrightsPage::changeableGroups() and changeableByGroup() to the User class and make the latter static
* In doSaveUserGroups(), drop groups that the user doesn't have from $remove (and those that they do have from $add), and return array($add, $remove)
* Fix up a comment in ApiQueryRecentChanges
2009-03-24 16:04:50 +00:00
Roan Kattouw
88f35cdf6e API: Some cleanup
* Aggressively intval() numeric things; addresses the concerns raised on bug 11633
* Use ApiQueryBase::addTitleInfo() everywhere
* Remove a drug-induced-looking line from ApiQueryWatchlist.php
2009-02-27 16:03:01 +00:00
Roan Kattouw
9a7d4c9795 API: Fix up r47470: User::newFromRow() needs all rows from the User table. This kills lots of warnings and really fixes bug 17561 2009-02-21 12:44:41 +00:00
Roan Kattouw
02e968c1c8 API: (bug 17561) Recommit r44231 ("Added usprop=emailable to list=users"), which was accidentally undone by r46845 2009-02-18 22:31:46 +00:00
Roan Kattouw
360f217786 API: Add AS explicitly for PostgreSQL compatibility and fix hinky indentation in ApiQueryUsers. Patch by Brad Jorsch 2009-02-16 19:08:07 +00:00
Roan Kattouw
036351d362 API: Fix yet another regression from r46845 that completely broke list=users. Patch by Brad Jorsch 2009-02-16 17:47:54 +00:00
Roan Kattouw
2df33ff098 * API: BREAKING CHANGE: (bug 11430) Return fewer results than the limit in 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()
2009-02-05 14:30:59 +00:00
Roan Kattouw
56d9fba12d API: Recommit r44182 (Added usprop=canemail to list=users) and rename canemail to emailable 2008-12-04 14:42:30 +00:00
Brion Vibber
77f1ee20d2 Pull back r44182 for now "* API: (bug 16526) Added usprop=canemail to list=users, which tells whether a user can (and wants to be) e-mailed through [[Special:Emailuser]]."
"canemail" is ambiguously named, and on first blush indicates that the user "can email", which would mean that they can *send* email, which doesn't appear to be what it's used for.
2008-12-03 23:37:27 +00:00
Roan Kattouw
1040ce28e4 * API: (bug 16526) Added usprop=canemail to list=users, which tells whether a user can (and wants to be) e-mailed through [[Special:Emailuser]].
* Refactored some code to use a User object
2008-12-03 19:07:16 +00:00
Siebrand Mazeland
c426e6b9d7 Consistent casing for wfGetDB(), getDB(), and getDBKey() 2008-11-06 22:38:42 +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
Rotem Liss
81874262b1 API change: Registration time of users registered before the DB field was created is now shown as empty instead of the current time. 2008-07-25 13:59:24 +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
5b8213e9ef * Re-applying r34449, r34500 and r34518 which Brion reverted by accident
* Adding ApiQueryBase::addJoinConds() as wrapper for Database::select()'s $join_conds parameter
* Migrating query modules to addJoinConds()
* Using implicit join rather than INNER JOIN in ApiQueryBacklinks
* Using FORCE INDEX (times) on logging table in ApiQueryLogEvents; although MySQL 4 seems to pick this index automatically (evidenced by the fact the WMF servers are still alive), MySQL 5 doesn't and filesorts
* Replacing LEFT JOIN with implicit (inner) join in ApiQueryContributions: revisions without a corresponding page table entry shouldn't be shown anyway
2008-05-10 10:49:26 +00:00
Brion Vibber
4bc02c88ca Revert to r34430 in order to revert r34431 which is breaking the site (unindexed filesorts) 2008-05-09 18:00:15 +00:00
Roan Kattouw
10274469e5 (bug 14022) Added usprop=registration and auprop=blockinfo 2008-05-09 10:00:34 +00:00
Roan Kattouw
b7d460aaeb API:
* Added ApiQueryBase::addJoin() which provides a cleaner interface to construct JOIN queries. Behind the scenes this still uses the old, ugly way, but it'll be easy to rewrite when/if the Database class gets its own function for JOINs
* Used addJoin() in query modules where necessary
* Removed FORCE INDEX (rc_timestamp) from ApiQueryRecentchanges: it's nigh impossible to integrate with addJoin() and it doesn't seem to be necessary anyway (my MySQL instance automatically chooses rc_timestamp)
2008-05-08 12:33:20 +00:00
Roan Kattouw
fa2ac03100 Reverting r34388, DanTMan fixed Database::select() in r34442. 2008-05-08 10:05:32 +00:00
Roan Kattouw
73158bd6de Fixing regression from r34353: using Database::select() for a join messes up in certain cases (puts `s where they don't belong, breaking SQL), but not for all joins. Seems to be related to table aliases, not sure though. 2008-05-07 18:57:06 +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
91ea00eedc (bug 13517) list=users threw fatal error when only invalid usernames are specified 2008-03-26 18:08:58 +00:00
Alexandre Emsenhuber
4f60e33303 setting property svn:keywords Id to api files that don't have it, for use in getVersion() 2008-03-03 19:34:11 +00:00
Roan Kattouw
19358606a1 API: Changing all modules' getParamDescription(), getAllowedParams() and 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?) 2008-01-28 19:05:26 +00:00
Roan Kattouw
a81bd8ad8f API: Splitting of uiuser part of meta=userinfo to list=users, as discussed on the API list. 2008-01-27 20:28:36 +00:00