[00:04:40] Bloody testing. [00:05:08] (03PS5) 10MarkTraceur: Add truncatable text field, use for some fields [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/121309 [01:04:48] (03PS18) 10Aarcos: Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 [01:05:27] (03CR) 10jenkins-bot: [V: 04-1] Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 (owner: 10Aarcos) [01:17:28] (03PS19) 10Aarcos: Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 [01:22:11] (03CR) 10Aarcos: "I think I responded to all your comments Gergo, PTAL. As discussed verbally, I came up with a workaround for the problems that you see in:" [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 (owner: 10Aarcos) [01:22:23] (03CR) 10Aarcos: Download tab, basic download and preview (039 comments) [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 (owner: 10Aarcos) [02:24:50] (03PS1) 10Gergő Tisza: Create StripeButtons class, convert reuse button to use it [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122631 [02:25:22] (03CR) 10jenkins-bot: [V: 04-1] Create StripeButtons class, convert reuse button to use it [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122631 (owner: 10Gergő Tisza) [06:23:02] (03CR) 10Gilles: "I confirm that I left target=_blank as a safety net in case for some reason ?download stops working. Recent browsers correctly clear the t" [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 (owner: 10Aarcos) [07:07:48] (03CR) 10Gilles: [C: 032] Use mw-mmv CSS prefix consistently for all things [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122572 (owner: 10Gergő Tisza) [07:08:19] (03Merged) 10jenkins-bot: Use mw-mmv CSS prefix consistently for all things [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122572 (owner: 10Gergő Tisza) [07:14:00] (03CR) 10Gilles: [C: 031] Refactor dropdown size calculation [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122611 (owner: 10Gergő Tisza) [07:25:56] (03CR) 10Siebrand: [C: 031] "i18n/L10n reviewed." [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 (owner: 10Aarcos) [07:32:25] (03CR) 10Gilles: [C: 04-1] Add truncatable text field, use for some fields (037 comments) [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/121309 (owner: 10MarkTraceur) [07:38:18] (03CR) 10Siebrand: [C: 04-1] "i18n/L10n reviewed. May contain changes author didn't mean to submit." (032 comments) [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122631 (owner: 10Gergő Tisza) [07:53:36] (03PS3) 10Gilles: Disable IE < 9 [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122422 [08:09:34] (03PS6) 10Gilles: Fixes various bugs in IE [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122398 [08:09:59] (03CR) 10jenkins-bot: [V: 04-1] Fixes various bugs in IE [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122398 (owner: 10Gilles) [08:12:01] (03PS7) 10Gilles: Fixes various bugs in IE [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122398 [08:12:09] (03CR) 10Gilles: Fixes various bugs in IE (032 comments) [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122398 (owner: 10Gilles) [08:12:24] (03CR) 10jenkins-bot: [V: 04-1] Fixes various bugs in IE [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122398 (owner: 10Gilles) [08:37:39] (03PS8) 10Gilles: Fixes various bugs in IE [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122398 [08:47:03] (03PS3) 10Gilles: Test to compare the performance of MMV and the Commons File: page [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/119917 [09:59:03] (03PS1) 10Gilles: Fix breakage on beta due to type hint being too strict [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122713 [10:00:14] (03CR) 10Gilles: [C: 032] "Self-merge because MMV is broken on beta without this change" [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122713 (owner: 10Gilles) [10:00:45] (03Merged) 10jenkins-bot: Fix breakage on beta due to type hint being too strict [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122713 (owner: 10Gilles) [10:31:32] (03PS4) 10Gilles: Test to compare the performance of MMV and the Commons File: page [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/119917 [10:31:46] (03CR) 10Gilles: Test to compare the performance of MMV and the Commons File: page (0312 comments) [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/119917 (owner: 10Gilles) [13:18:15] (03PS2) 10Gilles: Select html embed by default for logged-out users [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/121064 [16:32:10] (03CR) 10Aarcos: [C: 031] Fixes various bugs in IE [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122398 (owner: 10Gilles) [16:33:32] (03CR) 10MarkTraceur: [C: 04-1] "Needs a rebase." [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122611 (owner: 10Gergő Tisza) [16:53:50] (03CR) 10Aarcos: Add truncatable text field, use for some fields (033 comments) [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/121309 (owner: 10MarkTraceur) [17:24:56] (03CR) 10MarkTraceur: "Other issues" (039 comments) [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122611 (owner: 10Gergő Tisza) [17:29:07] Hey! anybody has an idea how to test functions inside mediawiki? gives me error as File not a valid entry point into mediawiki [17:30:15] umang13: Do you mean "unit testing" or "running the function to see what it does"? [17:31:16] The former is somewhat a subset of the latter, I guess. [17:31:30] Actually I wanted to include the file language.php into my test code index2.php and access a function of the class in language.php [17:31:54] Uh...huh [17:31:57] umang13: Why? [17:32:26] there is a function truncate.php [17:32:30] sorry truncate () [17:32:31] :p [17:32:46] i wanted to do some string munching [17:33:17] umang13: Is this code that will eventually go into a MediaWiki context, or is it a separate project entirely that just happens to use PHP? [17:33:50] In the former case, I would say stop procrastinating and put it into MediaWiki contexts *now*, in the latter case I would say you should copy the truncate code instead of trying to include the file [17:35:20] It is the former case [17:35:29] thanks [17:37:15] * marktraceur gets whiplash [17:37:22] When did we start using JSON i18n files [17:37:56] (03PS2) 10Gergő Tisza: Create StripeButtons class, convert reuse button to use it [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122631 [17:38:00] (03CR) 10jenkins-bot: [V: 04-1] Create StripeButtons class, convert reuse button to use it [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122631 (owner: 10Gergő Tisza) [17:39:10] marktraceur: Siebrand has been converting extensions for a couple days now [17:40:33] umang13: in theory you can use phpsh to get a php shell with a preloaded mediawiki context if you are on a vagrant box [17:40:37] never tried though [17:41:13] Oh cool. [17:41:32] <+tgr> ok, will look into it [17:44:00] umang13: Protip, you can use the "tab" key to complete usernames [17:44:06] Try typing "mar" and then hitting tab. [17:44:44] I do the same thing with tgr, even though he has a short nick, just to make sure he's still in the room. [17:45:15] marktraceur: Oh nice! thanks :) [17:46:01] marktraceur: I actually did not get you completely. The file I am testing is not going into mediawiki. It is just testing a patch that i am going to submit for another file in extensions. [17:46:41] I need a function from language.php as i am planning to use a function defined there for my patch [17:46:46] umang13: OK, then you should add the test to that extension's unit tests. [17:46:59] Rather than hacking in your test in a third-party untracked script that we'll never see. [17:47:03] umang13: What extension? [17:47:15] TimedMediaHandler [17:47:26] Oh, good, they should have a phpunit directory already [17:47:40] umang13: Look at phpunit/tests [17:47:41] yeah, will look at that [17:47:42] Er. [17:47:44] tests/phpunit [17:48:01] Either add to one of those files or add a new file of the same format [17:52:19] marktraceur: after adding to this directory I just run it normally like any php script is there another way?? [17:53:10] umang13: You should run the phpunit tests from the base mediawiki directory. [17:53:14] * marktraceur looks for docs [17:53:24] umang13: https://www.mediawiki.org/wiki/Phpunit [18:15:59] (03PS3) 10Gergő Tisza: Create StripeButtons class, convert reuse button to use it [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122631 [18:18:32] tgr, gi11es, I'm worried that we're doing utility classes wrong - shouldn't they be static? [18:19:54] not much of a difference IMO [18:20:33] actually i made HtmlUtils static at first, then converted it because of a misunderstood JSDuck error [18:20:47] and then i was too lazy to convert back [18:20:57] Hahaha [18:21:11] tgr: The difference would be memory allocation, I guess, which shouldn't impact anything too much [18:21:15] anyway, in PHP i would avoid statics like plague [18:21:17] But the ocd in me is complaining [18:21:22] Oh? [18:21:27] Use singletons instead, I guess? [18:21:34] even with simple utility classes it can be a major pain in unit testing [18:21:41] no, singletons are almost as bad [18:22:05] dependency injection wins big time if you want to write good tests [18:22:12] *nod* [18:22:41] in javascript it is not that much of a deal due to duck typing and the ability to replace functions dynamically [18:24:29] i don't think there is any significant difference in functionality, either way you have a prototype object with all the actual contents, if you use instances then you have a few empty objects on top of that, but that's like a couple dozen bytes of memory [18:26:09] IDE support for autocompletion etc might differ, but my IDE sucks both ways, not sure if others favor one or the other [18:33:41] Yeah, my vim will do autocomplete of whatever I tell it to [18:33:44] So it ain't matter [18:35:01] this.util.TruncatableTextField.ThumbnailSizeCalculator.UploadWizardUploadInterface.loadViewer [18:35:18] vim doesn't care [18:36:46] anyway, i can turn it back static if you feel strongly about this [18:36:56] Not really [18:37:08] a self-instantiated object is not much different from a static anyway [18:37:12] Just a little weirded out by having util instances of the same type in many places [18:37:26] Oh, maybe I'm misreading how this works [18:37:32] would be nice to haver a proper dependency injection container, but i doubt we will have the time for that [18:38:51] well, an instance is basically something like an object {__prototype__: mw.mmv.HtmlUtils} [18:38:56] so it is really small [18:40:13] Yeah, I see that now [18:40:28] I think I looked at it and thought HtmlUtils was HUP [18:40:33] So this is more better [18:57:54] » » // Can't add the @property definition because jsduck parses files in alphabetical order 40 [18:57:57] » » // and .embed comes before .utils [18:58:00] Hahahahaha [18:59:01] that was another misunderstanding [18:59:05] Oh? [18:59:18] clarity of error messages is not a strong point of jsduck [18:59:21] Haha, no [18:59:30] I guess I will comment on it then [18:59:42] isn't it fixed already? [18:59:56] Uh...maybe? I'm reviewing PS [18:59:59] 19* [19:00:08] iirc aarcos added the @property in the latest version [19:00:24] Hm [19:00:25] or maybe this happened at multiple places [19:00:28] Will re-review then [19:00:29] Hahaha [19:00:54] I almost don't want to fix it for the sheer joy it causes me to imagine the brokenness of jsduck [19:26:39] (03PS1) 10Gergő Tisza: Feedback button [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122877 [19:40:12] Does any one have knowledge about $wgContLang? what all functions can I call using it? where can I use it [20:00:00] gi11es: You may have to add me via my "bawolff@gmail.com" email address. Google hangout doesn't like '+' signs in emails [20:00:49] alright [20:00:51] umang13: I guess it's a Language object [20:01:13] umang13: [20:01:16] https://doc.wikimedia.org/mediawiki-core/master/php/html/classLanguage.html [20:02:34] umang13: You can call it as $wgContLang->truncate [20:02:40] where $wgContLang is a global variable [20:03:44] umang13: In general you should learn to look through the PHP docs, they're your most helpful reference in navigating mw core [20:13:15] bawolff: I tried calling it as $wgContLang->truncate, however it is showing an error saying undefined variable. Are there any prerequisties to use $wgContLang?? [20:13:24] global $wgContLang; [20:13:27] I tried declaring it as global [20:13:31] yeah exactly [20:13:46] it says non member accesing member function [20:13:54] *accessing [20:21:20] Do I need to include any file in my code to use $wgContLang? [20:21:33] It should be set up automatically in a MediaWiki context [20:21:50] umang13: Are you still calling this from some random PHP script that's not part of MW? [20:22:33] No, The script is a part of MW [20:22:55] umang13: When is the code you're writing called? [20:23:08] I assume here that it's a hook, special page, API module, or similar. [20:23:50] when I open the page using my browser, that is I removed the code that does not allow invalid entries into mediawiki and used my browser to run the script [20:24:02] ...no. [20:24:06] No, it is not a hook [20:24:18] umang13: Use a hook, or a special page, or something established. [20:24:25] Don't Hack Core(tm) [20:24:53] Ok, no that was just on my system, just commented out a bit, not advisable? [20:25:08] No. [20:25:19] You should be building whatever you're building in the context in which you want to build it [20:25:26] Not in some hacky context that clearly isn't working. [20:25:45] Especially since when you totally destroy the assumptions that MediaWiki operates under, we cannot help you at all. [20:42:15] "Are you still calling this from some random PHP script that's not part of MW" <-- wat? [21:02:15] bawolff: umang13 has been using MediaWiki functions and classes from non-MW PHP scripts for no discernible reason [21:26:04] (03CR) 10MarkTraceur: [C: 04-1] "Bunch of comments, mostly minor, haven't tested" (0324 comments) [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 (owner: 10Aarcos) [21:52:28] (03PS1) 10Ori.livneh: Fix EventLogging schema registry [extensions/UploadWizard] (wmf/1.23wmf19) - 10https://gerrit.wikimedia.org/r/123107 [21:53:04] (03CR) 10Ori.livneh: [C: 032] Fix EventLogging schema registry [extensions/UploadWizard] (wmf/1.23wmf19) - 10https://gerrit.wikimedia.org/r/123107 (owner: 10Ori.livneh) [21:53:15] (03Merged) 10jenkins-bot: Fix EventLogging schema registry [extensions/UploadWizard] (wmf/1.23wmf19) - 10https://gerrit.wikimedia.org/r/123107 (owner: 10Ori.livneh) [21:58:41] (03PS1) 10Gergő Tisza: Make survey open in popup window instead of normal one [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/123109 [21:58:47] (03CR) 10jenkins-bot: [V: 04-1] Make survey open in popup window instead of normal one [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/123109 (owner: 10Gergő Tisza) [22:00:56] (03PS2) 10Gergő Tisza: Feedback button [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122877 [22:00:58] (03PS2) 10Gergő Tisza: Make survey open in popup window instead of normal one [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/123109 [22:01:00] (03PS4) 10Gergő Tisza: Create StripeButtons class, convert reuse button to use it [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/122631 [22:06:13] bawolff: Do you have a minute for a code review? https://gerrit.wikimedia.org/r/#/c/121094 GWToolset patch for a bug you reported. [22:06:22] right [22:06:25] I need to do that [22:07:15] Dan is hoping to have that and a couple of other patches merged by Thursday for some demo they are doing [22:07:44] I totally meant to look at the patch on the weekend, but didn't get to it [22:07:47] * bawolff goes looks at it now [22:47:16] https://en.wikipedia.org/w/api.php?action=query&format=jsonfm&meta=filerepoinfo [22:47:22] displayname: null [22:47:30] is that normal? [22:47:38] * marktraceur ... [22:47:43] No, I think not [22:47:45] Umm, interesting [22:47:48] That seems t3h bad [22:48:41] Looks like it is normal. Its also like that on my local install [22:48:57] "also broken locally" !== "normal" [22:48:59] guess the local repo doesn't need to have a name, as there is only one ever [22:49:06] marktraceur: whenever u have a sec can we go over your comments on download, have some questions and it is faster f2f, tx ! [22:49:14] Sure, was going to finish it up [22:49:20] I failed to get through all the files [22:49:35] bawolff: the name is always 'local' for local, i think [22:49:47] bawolff: I could have sworn we dumped in a human-name for it on local too [22:49:50] We really should [22:49:52] displayname is something that should be displayable to the user [22:50:21] iirc this used to work but i am not really sure about it [22:50:32] Yeah, I thought so too [22:51:03] You could probably argue it's the same as whatever's in siteinfo? [22:51:14] But that sounds like a non-argument [22:51:24] if ( $this->isLocal() ) { [22:51:24] return null; [22:51:24] } [22:51:41] ...sigh [22:51:51] so yeah, apparently normal [22:51:57] Now I've sighed at it it's going to turn out that I wrote it [22:51:58] ...for some value of normal [22:52:29] Chad, per git blame [22:52:44] anyway, i'll fix [22:52:49] Hah [22:52:54] What a bastard [22:52:57] unless you know a good reason for it to be this way [22:55:49] I'm asking ^d in -dev [22:56:04] I don't think there's any good reason for anything in our API [23:04:24] (03PS20) 10Aarcos: Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 [23:04:27] (03CR) 10jenkins-bot: [V: 04-1] Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 (owner: 10Aarcos) [23:18:50] Hmm, the code comment on GWToolset "may encode quotes, depending on the php.ini" sounds incredibly scary, but I guess that doesn't matter in this context [23:40:53] (03PS21) 10Aarcos: Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 [23:42:12] (03CR) 10jenkins-bot: [V: 04-1] Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 (owner: 10Aarcos) [23:55:30] (03PS22) 10Aarcos: Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 [23:56:04] (03CR) 10jenkins-bot: [V: 04-1] Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738 (owner: 10Aarcos) [23:58:05] (03PS23) 10Aarcos: Download tab, basic download and preview [extensions/MultimediaViewer] - 10https://gerrit.wikimedia.org/r/120738