[00:17:13] the url of the wiki [00:17:37] used for custom domains/domains that aren't in the form .miraheze.org [00:18:08] if it isn't set, MirahezeFunctions assumes that the domain is comprised of the databasename and .miraheze.org, ie meta.miraheze.org resolves to metawiki database [00:19:32] it probably does but I don't think it has been tested and we'd be unlikely to provide support to debug it if it went wrong [00:22:25] <.labster, replying to originalauthority> I’m mainly asking because MySQL uses RAND() and Postgres uses random() and I don’t know how to look this up in the code [00:23:22] <.labster> And if a dependency officially doesn’t support Pg I can ignore this [00:23:40] Like https://github.com/search?q=repo%3Amiraheze%2FCreateWiki+rand&type=code ? [00:25:15] <.labster> Can you give me a file link, I’m on mobile right now? [00:25:27] https://github.com/miraheze/CreateWiki/blob/e6ac66a84220d49d461172c9e8918733d9503a68/includes/WikiManager.php#L64 [00:25:35] WikiManager.php on line 64 [00:25:45] is the only instance of rand I think [00:26:30] <.labster> No that’s random on the application side, I need to run on the database [00:27:04] <.labster> For special:randomwiki [00:28:33] Special:RandomWiki doesn't use an database query for selecting the wiki [00:28:46] it pushes all of the wikis from cw_wikis into an array and uses php's array_rand to select one [00:28:54] <.labster> I know. It should though. [00:29:50] <.labster> It’s currently returning 100k times more data than the application uses which is awful [00:30:24] I don't know what you're asking then, tbh, just assume CreateWiki doesn't support postgres since it's never been tested I don't think. [00:30:45] <.labster, replying to .labster> Im asking this [00:30:58] yes I don't know what you're trying to look up. [00:31:07] <.labster> How to look up database engine [00:32:20] [1/2] This is probably not what you're asking but: [00:32:20] [2/2] `SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = 'databasename';` [00:33:09] <.labster> You’re right but it does answer what I asked. [00:33:35] <.labster> Okay, how do I look up the currently running database software? [00:33:50] From the mediawiki side? [00:33:57] <.labster> Yeah [00:34:21] <.labster> Or I can do feature detection like JS does lol [00:37:32] <.labster> I guess it’s just $wgDBtype [00:37:57] you can get that config yeah, but I swear there's an easier way to do it one second I'll check [00:39:30] I saw a way to do it a couple of weeks ago but I can't find it now, so yeah just get wgDBtype from config [00:43:39] <.labster> config->get( 'DBtype' ) I assume [00:45:11] yes (after you've gotten an instance of config factory [00:51:00] <.labster> Do I need a ConfigFactoryFactory to make the config factory? [00:51:38] <.labster> If so I will need more conveyor belts [00:53:09] [1/2] something like `$config = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'WikiDiscover' );` if this is in wikidiscover extension [00:53:09] [2/2] and then `$config->get( 'DBtype' );` [00:53:39] (or you can probably get 'main' since wgDBtype is provided by mediawiki core. [00:54:04] <.labster> That was a joke, see https://news.ycombinator.com/item?id=15952502 [00:54:30] tldr pls [00:55:04] <.labster> TL;DR Java programmers are a weird breed [00:55:14] mediawiki dependency injection is getting a bit out of hand though I agree [00:57:32] <.labster> A config object makes sense because it’s too easy to have one of 100+ extensions overwrite your global by accident [00:59:28] <.labster> Is it actually a factory though? Global state seems like a good use of a singleton [01:00:32] [1/2] > Global state seems like a good use of a singleton [01:00:32] [2/2] Idk I just know we don't use globals if we can help it 😆 [01:15:03] Everybody and their grandmother needs a config file, labster. You can't account for everybody's grandmother. [17:46:05] Not sure https://github.com/miraheze/RequestSSL/blob/150f9627c87550264783325752ee0c155ffec646/includes/RequestSSLManager.php#L477 works as I expected it would [17:47:58] I guess that's what I get for not testing [17:48:53] https://gist.github.com/redbluegreenhat/568a275d6a6ecec04db5d1d2bead0518 [17:49:42] basically, without a scheme, parse_url will assume it is a path! [17:50:46] So, if back in Special:RequestSSL, the user only inputs a hostname/domain name with no path (which I foolishly put in my i18n that it's allowed), it will fail! [17:55:43] Fortunately, it will fail back at form submission at https://github.com/miraheze/RequestSSL/blob/c99f3d9d555e2694346bb6e67862254c24429a89/includes/Specials/SpecialRequestSSL.php#L301, so any requests that fail here will fail there [17:56:34] *fail there first [17:57:14] solution would be mandating that the requester specify the custom domain and the https protocol [17:57:36] which is pretty sad because I wanted it to be like on phab, were you don't have to do that [22:23:32] Are we back at 8k wikis or is the magic word stuck? I thought we deleted a lot and went down to like 6k