[00:04:37] hello [00:04:42] Hi [00:26:55] 14(WFM) Link to Special:ChangePassword has disappeared from Special:Preferences tab User Profile - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=18603 +comment (10agarrett) [00:55:38] 03werdna * r49919 10/trunk/phase3/includes/HTMLForm.php: Fix display of inverted check fields in HTML forms -- fixes bug 18581. [00:55:46] 03(FIXED) Enable e-mail from other users setting not displayed correctly - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=18581 +comment (10agarrett) [01:38:42] 03werdna * r49920 10/trunk/phase3/ (3 files in 2 dirs): Made email option actually work, fixed bug 18580 (new preferences page does not display email confirmation data) [01:39:34] 03(FIXED) New preferences page does not contain e-mail confirmation data - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=18580 +comment (10agarrett) [01:49:21] 03werdna * r49921 10/trunk/phase3/includes/Preferences.php: Implement quickbar settings [01:49:29] 03(FIXED) Quickbar has disappeared in Cologneblue and Standard skins - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=18595 +comment (10agarrett) [02:21:07] 03(mod) info vs code reversed in api error message - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=18602 +comment (10b-jorsch) [02:24:33] 03shinjiman * r49922 10/trunk/phase3/languages/messages/ (4 files): Localisation updates Cantonese, Chinese and Literary Chinese [02:31:18] 14(DUP) info vs code reversed in api error message - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=18602 +comment (10c.stafford) [02:31:21] 03(mod) API error code and info values switched - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=17703 +comment (10c.stafford) [02:52:46] 03werdna * r49923 10/trunk/phase3/includes/Preferences.php: Split preference data out to separate methods so I can actually find my way around the code [03:00:14] 03(mod) User's namespaces to be searched default not updated after adding new namespace - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=14609 (10agarrett) [03:02:12] hi [03:02:18] i'm having some api trouble [03:03:18] i'm trying to do an edit to a page, but my wiki requires authenticated users [03:03:32] 03(mod) Line-wrap help/error info in &format=jsonfm - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=16422 +comment (10b-jorsch) [03:04:06] TimStarling: hmm, is it worth implementing some way of purging the user cache whenever LocalSettings.php is changed? When default options are updated, it seems not to apply unless you restart memcached. I was thinking of repurposing MW_USER_VERSION and $wgCacheEpoch. [03:04:15] api?format=json&prop=info%7Crevisions&token=8f611c780a025e9c67ffdc52c4643bd1&titles=Main_Page&action=query&intoken=edit [03:04:21] that is the query i am using [03:04:39] the token is the lgtoken from my auth query [03:05:04] is there something in the user cache that depends on LocalSettings.php? [03:05:12] NorthIsUp- AFAIK, the login info has to be passed as cookies [03:05:18] ooooooooooooh [03:05:34] that would be it [03:05:53] um, can you do that from python? [03:06:13] pywikipedia does it somehow [03:06:45] TimStarling: yes, there is now -- User::mOptions now depends on $wgDefaultUserOptions [03:07:08] hmm, cool. maybe i can just use that instead of doing it on my own [03:07:33] It's just that that update can wait for the user objects to fall out of the cache, it's not that critical. [03:08:07] so you store it merged? [03:08:17] yes, presently [03:08:31] because the general methodology is "Load default settings, and then load in stuff from the database over the top of it [03:09:00] I suppose just the stuff from the database could be stored separately, and merged per request [03:09:03] I think it would be better to store it unmerged than to add some cache-clearing hack to LocalSettings.php [03:09:24] Well, we already have $wgCacheEpoch [03:09:28] but I take your point [03:09:34] I wish that wasn't there [03:10:00] that filemtime hack in LocalSettings.php, the whole file should just be for data [03:10:13] it'd be a lot easier to update if it was [03:10:29] the include DefaultSettings.php is a hassle too, I wish that wasn't there either [03:11:20] well, globals for configuration isn't a great design choice in the first place [03:12:18] no [03:12:31] but it would be possible to stop using globals and maintain backwards compatibility with LocalSettings.php [03:12:39] it's just that we'd break a million lines of extension code [03:13:29] true. [03:14:54] *werdna imagines something like Configuration::getConfiguration( 'settingname' ) [03:15:10] we could migrate to a system based on get_defined_vars(), like what we use for message files [03:15:34] 03shinjiman * r49924 10/trunk/extensions/ (93 files in 89 dirs): Follows up r49890, adding file location itself to obtaining the revision number shown in the Special:Version [03:15:39] right. [03:16:54] do I need to point out that Configuration::getConfiguration( 'settingname' ) is massively long and ugly? [03:17:28] especially since settingname will often be prefixed with the extension name [03:17:46] I would go for wfConf('settingname') [03:17:47] probably not, but you get the point that retrieving a setting would be a method call, rather than a global. [03:18:21] that could be a wrapper for a call to a non-static member function on a configuration object [03:19:09] like wfGetDB() is with the LoadBalancer, wfGetLB() is with the LBFactory? [03:19:35] yes, there's a lot of them that I've introduced [03:19:49] you can't beat the brevity of a global function [03:20:13] and it makes it independant of the backend [03:20:30] wfGetDB() used to be a call to $wgLoadBalancer->getConnection() [03:20:53] now it's a call to LBFactory::singleton()->getMainLB()->getConnection() [03:21:04] more abstraction, same calling code [03:21:14] I consider static functions to be like global functions, except with namespaces [03:21:26] they can also be autoloaded [03:21:31] at the cost of brevity. [03:21:50] but I suppose autoloading isn't really a benefit for something that's loaded every request anyway. [03:22:21] well, some things are not necessarily used on every request [03:22:32] Hi [03:22:33] but as long as they're one-line functions, it doesn't really matter [03:22:48] mind you, it's important that they really are one line [03:22:54] I'm thinking of stuff like the AbuseFilter class. [03:23:16] if you make a two line wrapper function, someone will add some features to make it 6 lines [03:23:17] It's like 2000 lines of utility functions, so it's important that it's autoloaded. [03:23:27] and then someone else will add some features to make it 100 lines [03:23:41] but if it starts as one line, it stays that way [03:23:50] Interesting. [03:24:31] Is it normal for parserTests to fail a handful of tests? [03:24:40] because the complexity gets added to the backend function instead [03:24:48] Nephele: yes [03:25:15] OK, thanks. So I shouldn't worry about those failures? [03:25:32] no [03:25:44] Nephele: I think we're sitting at 14 at the moment [03:25:48] is that what you're getting? [03:25:50] Yep [03:25:56] okay, then don't worry :) [03:26:28] parser tests aren't aimed at end users [03:26:49] many of them are just TODO items aimed at annoying developers into fixing them [03:27:13] I suggested marking some tests as "expected fail", but brion thought that would reduce the amount of developer annoyance [03:27:59] Aha... might even work on me ;) Because they are a bit annoying [03:28:52] I don't think there are many people who understand the parser enough to fix them. [03:29:10] The only person who knows it inside out is TimStarling [03:29:22] because he wrote most of it [03:31:14] Yeah. I could figure out where the new failures that I added at one point were coming from, but trying to figure out where ftp://|x|| is parsed is a bit overwhelming [03:33:32] But while I'm here with the expert... is there a reason why Preprocessor.php contains interfaces rather than abstract classes? [03:34:14] because some day I'm going to write an implementation of those interfaces in C [03:34:24] and it wouldn't make sense to be calling the PHP base functionality from C [03:35:30] Hmm... so changing PPFrame to an abstract class wouldn't be a good idea, even if it's possible to get rid of some redundant code? [03:36:12] in principle you could factor out common code in the two PHP implementations into a common base class [03:36:26] but that common base class wouldn't be PPFrame, it'd be some new class [03:36:56] Yeah, I could do that [03:37:04] the reason the code is duplicated is because I imagined that we would only have one PHP implementation [03:37:11] and that the other one would be deleted [03:37:55] it turns out that the two implementations are both needed [03:38:38] because the DOM one doesn't work on all platforms, but it uses a lot less memory [03:39:18] I thought that if a module was compiled into PHP by default, that meant you could use it [03:39:22] but that's apparently not the case [03:41:16] It would also be interesting to refactor the parser in such a way that all of the calls to the MediaWiki core were callbacks, so you could easily divorce it from MediaWiki and use it in other places. [03:42:39] The reason I've been mucking about with PPFrames is that not having getVariable available in top-level frames is making it impossible for me to migrate an extension from MW1.10 to a more up-to-date MW version [03:43:49] So I was looking at moving a lot of the variable-processing functions up to PPFrame -- or now, to a common base class [03:43:53] there's no getVariable() [03:44:07] do you mean getArgument()? [03:44:17] Sorry, yep, getArgument() [03:45:36] so how do you have an argument to a top-level frame? [03:45:43] I've written an extension that makes it possible to define template arguments [03:47:05] you mean in a procedure-like way? [03:47:12] {{#setvar: x = y}} [03:47:19] {{{x}}} [03:47:41] Yep, except the specific syntax I chose is {{#define:x|y}} [03:48:39] you could subclass Preprocessor_DOM [03:48:53] or Preprocessor_Hash, I would say choose one [03:49:39] say Preprocessor_MyExt [03:50:01] then you would override Preprocessor_MyExt::newFrame() to generate a PPFrame_MyExt [03:50:10] Yeah, true [03:50:12] then you would override PPFrame_MyExt::getArgument() [03:50:18] then extension setup would be: [03:50:36] $wgParserConf['preprocessorClass'] = 'Preprocessor_MyExt'; [03:51:20] 03werdna * r49925 10/trunk/phase3/includes/User.php: [03:51:20] Fix problem where cached user objects would not update when default user options [03:51:20] were changed. Now, only the option *overrides* are stored in the cache, and the [03:51:20] options themselves are built from the defaults + overrides per request. [03:52:59] So you don't want any of the argument-related functions/arrays defined in the top-level PPFrame class because of the extra overhead? [03:53:46] 03shinjiman * r49926 10/trunk/extensions/ (78 files in 78 dirs): Follows up r49890, adding file location itself to obtaining the revision number shown in the Special:Version [03:54:53] I don't want to add more features to the core preprocessor unless they are very carefully considered [03:55:52] because I want the focus to be on performance, and additional complexity will discourage optimisation [03:58:19] OK, fine by me. I'll take the subclass approach, then, and keep my fingers out of the standard PPFrame classes ;) Thanks for the tip! [03:59:34] no problem [04:16:46] I was looking at the vim source on the weekend, pondering LP #365860 [04:18:25] it's an interesting case of an app that must have started off simple, at some time in the distant past, and slowly became more complex [04:19:31] it has a file called getchar.c, and you can imagine it being like a wrapper around the standard C getchar() [04:20:01] it's 5100 lines [04:20:40] that's quite a bit of locigic [04:20:42] and that doesn't include UI-specific code like actually calling getchar(), that's in the UI modules [04:21:59] *werdna wins the bugzilla top resolver contest for the week [04:21:59] whee [04:23:18] its use of the preprocessor is quite shocking in places [04:24:24] http://pastebin.ca/1404435 [04:25:07] why for (;;) instead of while (true)? [04:26:04] personal style, it's not uncommon [04:26:08] they're identical, and I would assume that while (true) would be recommended because it's actually readable. [04:26:19] that's not the issue there [04:26:27] yes I know, just a side note [04:26:32] heh [04:27:13] I wonder if there's merit in using hooks within core, to keep code related to particular features all in one place. [04:27:37] well yes, there is, and in fact they do [04:27:41] this is in a file called os_unix.c [04:28:16] actually it uses selective linking rather than function pointers [04:28:29] hey brion [04:28:33] but it's modular nonetheless [04:28:36] hi brion [04:29:03] *brion waves [04:29:05] howdy all [04:29:09] *ToAruShiroiNeko watches the TimStarling-brion reunion in tears [04:29:21] *TimStarling acts busy [04:29:30] wait this isn't a soap opera, is it? [04:29:39] brion: How is the code review going? :P [04:29:48] My code's compiling. [04:29:52] little behind :D [04:29:53] \o/ [04:30:11] ;-) [04:30:13] oh, crap, PHP is interpreted :) [04:30:17] hehe [04:30:18] I was just saying, I was checking out the vim source code yesterday, it has the most awful abuse of the preprocessor [04:30:38] ok maybe not quite as bad as glibc [04:30:40] but pretty bad [04:32:01] Ay caramba [04:32:26] I see a disproportionate amount of yellow squares to green squares in the scap map [04:34:06] it's white that's "ok" [04:34:22] http://www.xkcd.com/ [04:34:24] white and green are boht good :D [04:34:25] *werdna amuses self [04:35:12] Oh, well I guess that isn't as bad :P [04:35:16] *werdna hopes brion doesn't have to pull another all-nighter [04:36:10] Heh, I like today's xkcd [04:38:43] It's so true, just now I saw "Ever since the SWINE FLU, I've been avoiding mexican people", and "Swine flu is scary! Maybe this is why God said pigs were unclean animals." [04:39:46] brion: so the new prefs stuff is in trunk if you want to take a squizz [04:39:56] ... or enjoy your weekend [04:40:00] whatever works for you :P [04:42:20] http://www.sherdog.net/forums/f7/swine-flu-hoax-967145/#post30468508 [04:42:22] *chuck notes that the weekend is over in about 2 hours :P [04:42:22] I hate the internet [04:44:06] werdna: "She's and orthopedic trauma surgean and I believe she cured herself of cancer a while back by eating nothing but fruits and vegetables" [04:44:18] wow, she must be right! [04:44:46] 03(FIXED) User's namespaces to be searched default not updated after adding new namespace - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=14609 +comment (10agarrett) [04:45:26] 03shinjiman * r49927 10/trunk/extensions/ (135 files in 135 dirs): Follows up r49890, adding file location itself to obtaining the revision number shown in the Special:Version [04:46:07] 03(FIXED) "Restore all default settings" needs confirmation dialog - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=17188 (10agarrett) [04:46:16] Shinjiman: what's that got to do with preferences? [04:46:23] oh no ignore me [04:46:29] I'm thinking of r49790\ [05:02:58] The Image:foo.png page has a "delete all" link. Does this mean "delete all versions of this file?" [05:07:08] nm [05:08:27] same as the [delete] tab at top [05:09:00] just looked a bit scary [05:23:32] werdna: does anything use mOptions directly? [05:23:45] just wondering if it makes more sense to put only the ones we've set in mOptions to begin with [05:23:46] Where can i get a copy of Bryan's mwclient module for python? [05:25:28] brion: I don't know, maybe [05:25:40] let me grep [05:28:58] wtf [05:29:09] why is Special:Preferences' login login opening in a new window? [05:29:59] login login? [05:30:08] ah i think i've got some shitty experimental option on [05:30:09] I don't understand what you mean [05:30:25] "You must be logged in to set user preferences. " [05:30:34] login link [05:30:41] oh right [05:30:54] I think there's still some ui cleanup to do too [05:31:21] SELECT gp_property,gp_value FROM `global_user_properties` WHERE gp_user = '13' [05:31:22] oh my :) [05:31:39] what's up? [05:31:52] ok, who's funked in how many new tables? [05:31:59] in how many things? [05:32:20] that's all me [05:32:38] global_user_properties is for global prefs :) [05:33:10] i assume this is centralauth? [05:33:25] right [05:34:00] extensions/CentralAuth/db_patches/patch-global_properties.sql [05:34:07] gp_user int(11) NOT NULL, [05:34:07] ^ i recommend against specifying sizes on ints like that [05:34:18] not only doesn't it do anything useful, but it confuses people who think that it might mean something :) [05:34:35] *werdna drops [05:34:51] what's a "property" and how's it different from a "preference" or "option"? [05:35:19] Well originally the idea is that we might store some other key-value stuff [05:35:23] 03werdna * r49928 10/trunk/extensions/CentralAuth/db_patches/patch-global_properties.sql: Remove (11) after int(11) -- useless [05:35:25] but I agree that the nomenclature is confusing [05:35:46] i'd probably recommend using nomenclature that describes the factual use :) [05:35:51] this would be less confusing [05:36:03] it's called preferences in the UI, options in core and properties in teh DB and in CentralAuth [05:36:23] pls fix thx :) [05:36:39] user_prefs sounds good? [05:37:22] how are the global ones used? what's the ui? how does one control them? [05:37:50] it's on/off for now [05:38:16] on or off what? [05:38:30] Notice: Undefined variable: wgLang in /Library/WebServer/Documents/trunk/includes/Preferences.php on line 297 [05:38:32] Fatal error: Call to a member function timeAndDate() on a non-object in /Library/WebServer/Documents/trunk/includes/Preferences.php on line 297 [05:38:43] brion, does it make sense to write in bugzilla a feature request for immediate use of localisations once they enter WMF SVN from translatewiki.net ?? [05:38:52] GerardM-: yes? [05:38:53] there's a setting down the bottom of the preferences dialogue, Use these preferences on all projects [05:38:58] 03siebrand * r49929 10/trunk/phase3/ (2 files in 2 dirs): [05:38:58] Follow-up on r49920. [05:38:58] * email -> e-mail for consistency [05:38:58] * add key to messages.inc [05:39:03] werdna: wouldn't know, prefs dialog doesn't work :) [05:39:18] ah [05:40:20] 03werdna * r49930 10/trunk/phase3/includes/ (Preferences.php User.php): Fix missing global wgLang [05:40:20] fixed those fatals, thanks for that -- remnants from some reorganisation I did this morning [05:40:27] okay the renaming thing [05:40:58] so you want me to change any references to 'properties' to be references to 'options' or 'preferences'? [05:41:12] *werdna would prefer options, options is the internal name for them. [05:41:54] options is fine i suppose :) [05:42:00] deferences to brion's references preferences? [05:42:07] *Splarka waits for stab [05:42:13] *werdna stabs. [05:42:14] Notice: Undefined variable: wgLang in /Library/WebServer/Documents/trunk/includes/Preferences.php on line 407 [05:42:14] Fatal error: Call to a member function getMathNames() on a non-object in /Library/WebServer/Documents/trunk/includes/Preferences.php on line 407 [05:42:35] test before you commit dude :) [05:42:49] sigh, I don't have math enabled on my local site [05:43:02] *werdna searches for '$wg' in all of the split-off functions [05:43:27] sorry :( [05:43:31] :D [05:44:07] 03werdna * r49931 10/trunk/phase3/includes/Preferences.php: Fix preferences for sites with math enabled [05:44:46] brion: how goes code review? (oh wait... it is sunday at almost 11pm, is that my answer?) [05:45:09] have we gained more tabs? [05:45:13] yes [05:45:19] at my window size i've got three tabs spilling offo nto a second line now [05:45:22] I split off one tab from user profile, 'E-mail options' [05:45:22] it looks kind of icky [05:45:30] (including gadgets) [05:45:31] and one from 'Misc', 'Page Rendering' [05:45:52] we need a better way to organize those tabs [05:46:04] yeah [05:46:47] email and email options are no longer on the same screen, which seems bad to me [05:46:55] 03(NEW) update localised messages as soon as possible - 10https://bugzilla.wikimedia.org/show_bug.cgi?id=18604 enhancement; Normal; Wikimedia: Language setup; (Gerard.meijssen) [05:47:26] and.... something doesn't work [05:47:28] That's something else I've been thinking about [05:47:36] i changed my email, hit enter, and it says "your preferences have been saved" [05:47:40] but shows me the old value in the form [05:47:46] *werdna tries [05:47:55] so 1) it doesn't appear to have saved it [05:48:14] works ok for me [05:48:15] hmm [05:48:28] yeah i tjust doesn't change at all [05:48:34] just keeps showing my old brion@localhost [05:48:40] insted of the brion@pobox.com i'm typing in [05:49:00] I just changed to to andrew@werdn.us and back to andrew@localhost and it worked. Hmm. What would be different about our setups? [05:49:12] lemme test again without centralauth [05:49:33] ok, with centralauth gone it lets me change it [05:49:36] but, i have a serious regression [05:49:53] it's no longer telling me that my new address is unverified and that it's sent me a confirmation mail [05:50:14] if i happen to click over to 'email options tab' it now tells me that it's unverified, but i have to really look for it [05:50:27] ah yeah, that's marked FIXME in the code still [05:50:34] and all the email option checkboxes are still enabled -- most of them should be greyed out [05:50:52] I'll try to find a way to get that message out into the UI [05:50:57] well, it needs to either work or this needs to be pulled from trunk :) regressions are bad :D [05:51:14] I'll see what I can do [05:51:18] yay! [05:52:04] Actually now that I think about it it's obvious how to do it [05:52:14] spacing also seems odd on things like the skin list [05:52:16] big huge left margin [05:52:33] yes, that's something else I know about but need to think about how to fix [05:52:51] See, the general assumption is that each field has a label and an input [05:53:00] if there's no label, then that column is blank [05:54:11] *nod* [05:54:34] I've got it set to a fixed width because varying widths look strange from page to page [05:54:40] problem is when there's NOTHING in the LHS [05:54:53] we've lost the timezone autodetect button, it seems [05:55:07] so I need to either add a label for those, or remove the space [05:55:10] spacing looks odd on that tab too [05:55:17] too little space under the selector [05:55:19] Parul suggested I move that button into the