Commit graph

92 commits

Author SHA1 Message Date
awjrichards
c29fd59775 Big oops - merged to wrong branch.
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"

This reverts commit ee0d3d330f
2012-06-05 22:58:54 +00:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
Hoo man
932774a5e2 Fixed the API doc. for aurights (list=allusers)
Listings with aurights can't show users with rights which are
granted by implicit or auto-promoted groups like *, user, or autoconfirmed.
This is my first commit, btw.

Change-Id: I083eb977393729961317d0f3cf9f7cfaa50fde51
2012-05-29 14:17:19 +02:00
Aaron Schulz
fdb74872a8 Merge "multi dbms support in api" 2012-05-20 18:15:42 +00:00
umherirrender
278bb4414f multi dbms support in api
Add some calls to Database::timestamp
Change some calls from Database::strencode to
Database::addQuotes to avoid ' in raw sql
Remove ' from ints in raw sql
Rename some vars to avoid duplicate names

Change-Id: I63f5602fa968f969a42932902a3ccc45fc54b432
2012-05-16 19:22:36 +02:00
Reedy
c87a63935a Merge "(bug 19195) Make user IDs more readily available with the API" 2012-05-10 18:47:42 +00:00
Szymon Świerkosz
b433d1958b (bug 33602) list=allusers throws exceptions with invalid names
Follow up to: I7d115e734cb8c93dcf6dc3b98bdbc81975951273.
I have replaced $this->keyToTitle calls with simple str_replace.
As a result invalid user names will be accepted in parameters, so
the chain of requests based on query-continue will not be broken
by invalid entry in the database.

Change-Id: I8a80fe6395ae6e9304e4d9ec7b604195ec3c9d00
2012-04-26 23:45:09 +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
Szymon Świerkosz
6cf8cd357e (bug 33602) list=allusers throws exceptions with invalid names
Some MediaWiki installations have invalid user names in user table
(most notable example: en.wikipedia). This commit DOES NOT resolve
the issue completely, it only makes the API behave more gracefully.

I have replaced User::newFromName call with User::newFromId, so the
User object should be always constructed. In case it was not, an
empty array will be provided instead of null when returning user
rights. I have removed keyToTitle calls for ContinueEnumParameter
as user names in the database are stored without underscores
(en.wikipedia has of course one user with _ in the database...).
This should fix invalidtitle error thrown.

There is one issue I don't know how to solve. When API outputs in
query-continue aufrom value with invalid user name, subsequent
call with aufrom set will return an error, because input parameters
'from' and 'to' are passed to keyToTitle method too. Should I
replace it with simple str_replace('_', ' ')?

Change-Id: I7d115e734cb8c93dcf6dc3b98bdbc81975951273
2012-04-15 10:37:03 +02:00
Sam Reed
107489687a Merge r111667 into trunk 2012-02-16 20:13:35 +00: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
Roan Kattouw
cd9b698d8e list=allusers was throwing fatals when invalid user names occurred in the database. Address this scenario gracefully 2011-10-11 15:45:27 +00:00
Sam Reed
bd6ecdca92 Fix whitespace 2011-09-28 16:37:27 +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
c62b074da7 Remove call to User::getImplicitGroups() from ApiQueryAllUsers
Per the below, as User::getGroupsWithPermission() will return */autoconfirmed, etc if applicable

> var_dump( User::getGroupsWithPermission( 'createtalk' ) );
array(2) {
  [0]=>
  string(1) "*"
  [1]=>
  string(4) "user"
}

> var_dump( User::getGroupsWithPermission( 'autoconfirmed' ) );
array(5) {
  [0]=>
  string(13) "autoconfirmed"
  [1]=>
  string(3) "bot"
  [2]=>
  string(5) "sysop"
  [3]=>
  string(8) "reviewer"
  [4]=>
  string(9) "confirmed"
}
2011-07-18 16:09:50 +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
Brion Vibber
c2f924a509 * (bug 28634) document possible API caveat caused by accounts without the registration time field 2011-05-13 15:04:55 +00:00
Sam Reed
0b96c67a9e Remove unneeded manual quoting from r87180 2011-05-01 11:20:14 +00:00
Sam Reed
5283490bdd * (bug 28225) Allow hiding of user groups in list=allusers
Yay, a LEFT OUTER JOIN
2011-05-01 00:24:39 +00:00
Sam Reed
ab28af877c Followup r85884
Fixup the APIs strange way of doing table aliases on a join....

Only used in very few places
2011-04-30 23:18:34 +00:00
Sam Reed
76a4e7d4ce Followup r84363
Looks like I made a complete hash of that commit. Commit correct version from vm working copy
2011-03-26 18:39:22 +00:00
Sam Reed
74cfe3df00 Followup r79549, only try and filter by group (or right) if there are some groups to do a WHERE on 2011-03-24 20:27:30 +00:00
Sam Reed
e696d174eb Actually list implicit groups in allusers.
Looks like I might've regressed this in the course of fixing other bugs. Oh well, fixed now
2011-03-20 00:23:41 +00:00
Sam Reed
82dd198876 Followup r83849, fix join to be on indexed user_name 2011-03-14 11:07:58 +00:00
Sam Reed
886a70a3f7 Add missing group by from r83849 per Bryan 2011-03-13 19:35:08 +00:00
Sam Reed
237eb87db4 * (bug 26630) Add api for Special:ActiveUsers
Not sure if this would be better having been done as list=activeusers or something...

Meh, done! :P
2011-03-13 19:07:22 +00:00
Sam Reed
cb94b8f191 * (bug 27342) Add audir param to list=allusers 2011-03-13 17:23:45 +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
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
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
521044a529 Explicitally define $fld_rights on all code paths 2011-02-09 22:42:26 +00:00
Sam Reed
22832a2527 * (bug 26560) On allusers if limit < total number of users, last user gets duplicate
If $lastUserData is set to null, it won't get added again!
2011-01-04 04:05:32 +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
f1b7c91cf8 Followup r79545, we don't really care for duplicate userrights 2011-01-04 02:18:03 +00:00
Sam Reed
97a0295e34 Add rights to array. Grrr 2011-01-04 02:13:51 +00:00
Sam Reed
b30c1e7e72 Crappy spaces from r79549 2011-01-04 02:08:38 +00:00
Sam Reed
58df1dc895 Rest of * (bug 25767) Add userrights properties to allusers and users query lists
Add missing parameter from r79545
2011-01-04 02:06:55 +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
Sam Reed
fd976ad072 Part of Bug 19195 - Make user IDs more readily available with the API
ApiQueryAllUsers, ApiQueryImageInfo and ApiQueryRevisions exposing user_id
2010-08-28 00:37:48 +00:00
Sam Reed
ec744522af I really do hate whitespace 2010-08-26 22:12:01 +00:00
Sam Reed
ca6dc55a0d * (bug 24724) list=allusers is out by 1 (shows total users - 1) 2010-08-26 22:09:29 +00:00