[17:42:07] what is the limit of usernames you can pass to this (ususers)? https://www.mediawiki.org/wiki/API:Users [17:42:57] varies based on server config [17:43:29] also browser limits [17:43:44] (if doing things via AJAX) [17:44:38] in practice, you can probably specify as many as you want [17:45:02] Skizzerz: thanks [17:45:34] once your URL gets above 8k bytes (the entire URL, not just the ususers param), you might start running into issues [17:48:31] DMaza: ah, there is a mediawiki limit too now that I checked [17:48:41] maybe [17:48:46] * Skizzerz digs through more code [17:50:17] DMaza: so in addition to query string length limits (apache defaults to a bit over 8k for the entire request uri + http verb), it appears there is a limit of 50 for normal users and 500 for those with the 'apihighlimits' userright [17:50:28] Skizzerz: I was looking for a safe bet (considering the browser limit). But I think I'm gonna have to move on querying the DB [17:50:59] ah! where did you see that? Can you point me to the code ? [17:52:11] in ApiBase::parseMultiValue() there is two params $limit1 and $limit2 -- former is normal user limit, latter is apihighlimits [17:52:18] by default they are null, which defaults to 50/500 [17:52:47] awesome.. thanks a lot [17:52:53] ApiQueryUsers::getAllowedParams() doesn't specify explicitly, so it uses the defaults [17:57:51] just verified experimentally too: with 51 users specified on enwiki (where I don't have apihighlimits) I get a message saying it's capped at 50; on mw.o where I do have apihighlimits, it runs fine [18:12:19] thanks Skizzerz. that's very helpful [18:12:40] you're welcome :) [18:59:41] background: #f9f9f9 url(https://svn.wikimedia.org/skins/custom/images/page-base.png) 0 0 no-repeat; [19:00:07] what would that image have been? [19:01:09] https://web.archive.org/web/20140714022336if_/https://svn.wikimedia.org/skins/custom/images/page-base.png is that it? [19:02:32] DMaza: See the auto-generated help, e.g. https://en.wikipedia.org/w/api.php?modules=query+users. "Maximum number of values is 50 (500 for bots)" (where by "bots" it means any account with the apihighlimits right). You can get around browser URL length limits by doing a POST. [19:04:26] DMaza: If you need to determine it programmatically, action=paraminfo gives you the information in a machine-readable format, and tells you which limit actually applies to the account you used to make the paraminfo request. e.g. https://en.wikipedia.org/w/api.php?action=paraminfo&modules=query+users [20:22:50] thank you anomie [20:31:21] anomie: what do you think of the "odd" cases mentioned here? https://gerrit.wikimedia.org/r/#/c/392484/ [21:09:56] DanielK_WMDE_: The correct behavior when only user or user_text is passed would be to look up the other from the database (possibly deferred until it's actually needed), not to blindly use the $wgUser ID/name with a mismatched input name/ID. cf. the actor table patch, https://gerrit.wikimedia.org/r/#/c/380669/13/includes/Revision.php@833 [21:10:30] In other words, the current behavior is buggy. [21:31:27] anomie: yea. i tried to fix it. and id, except that I forgot that User::newFromName will return false if the name looks like an IP. [21:32:02] https://gerrit.wikimedia.org/r/#/c/374077/104..105/includes/Storage/RevisionStore.php [21:32:10] https://gerrit.wikimedia.org/r/#/c/375050/56..57/includes/Revision.php [21:32:22] i'm dead for today. [21:32:24] DanielK_WMDE_: Pass false for the $validate parameter. Or steal my newFromAnyId() method. [21:33:10] oh, right, didn't see that param either. i guess i'm tired. anyway, my code should work. [21:33:17] ttfn... [22:29:52] Krinkle: do you have an opinion on https://phabricator.wikimedia.org/T180994 ? distributing frontend JS/CSS via composer in vendor/ ? [22:30:29] legoktm: Don't Do That :) [22:30:56] legoktm: I'd say ResourceLoader does not support/encourage loading from somewhere other than wgResourceBasePath, including skinDir or extDir. [22:31:15] It happens to work right now (outside debug mode), but that isn't supported. [22:31:38] As for how to do it better, I suppose committing to git is one way, or having a local composer vendor inside the skin directory, is another way. [22:31:48] (e.g. not using composer merge, but you might not like that) [22:33:40] https://github.com/cmln/mw-bootstrap/commit/5fc27e4d58e089eb1fda30d683e5310dd0f5e58c [22:34:26] I guess that works but now having composer install stuff into resources/ is also really weird [22:34:35] Krinkle: could you say that on the ticket please? [22:47:30] legoktm: done [22:48:03] thanks