[07:37:03] who is mentoring kbrown? [07:39:01] neilk I believe [08:14:26] he guys, no one considered the fact that handing out 'beer' on a website such as ours might not publicity wise be a good idea ? [08:14:55] i mean informal, no problem, but promoted trough a Wikimedia developed extension, might be kinda tricky. [08:29:04] ? [08:39:48] Nikerabbit: http://blog.wikimedia.org/2011/06/24/wikilove-an-experiment-in-appreciation/ [08:41:18] hah [08:42:04] personally I don't understand why they must involve beer in everything [10:00:19] where is 'isGood()' defined? [10:04:05] ok found it is in includes/Status.php [11:27:07] thedj, http://www.mediawiki.org/wiki/Thread:Extension_talk:WikiLove/Localization [13:06:08] an extension of mine is having a few bugs, any devs around? [13:07:01] At least I'm here [13:07:08] Generally you can just ask your question, then wait for someone to help [13:07:22] (Might take a few hours for someone to wake up and notice, but such is the nature of IRC) [13:08:32] Hi RoanKattouw [13:08:46] it was saturday, so i was doubtful :) [13:09:06] Fatal error: Call to undefined method WebRequest::getCookie() [13:09:47] on this line $this->mUsername = $wgRequest->getCookie( 'UserName' ); [13:09:58] That's ... strang [13:10:00] e [13:10:18] Are you running the extension with an older version of MW? [13:10:27] 1.16 [13:10:28] getCookie() is present in core and probably in 1.17 but it might not have been in 1.16 or 1.15 [13:10:33] It's relatively new [13:10:38] As in less than a year old [13:11:02] but I copied that code from SpecialUserLogin & that file seems to work [13:12:08] and I checked includes/WebRequest.php, it does contain getCookie() [13:13:26] Something strange is going on there [13:13:42] Are you sure you don't have two WebRequest.php files or two MW versions lying around that could contaminate each other? [13:15:36] No because SpecialUserLogin on the same wiki works fine [13:18:09] the code is here http://pastebin.com/34pGEWEJ [13:18:17] the problem is on line 609 [13:26:30] Well holy shit [13:26:35] Did you copypaste Special:Userlogin ? [13:27:16] You really shouldn't [13:28:05] It'd be nicer to extend the user login page instead [13:29:25] No, I copied SpecialUserSignup which I coded [13:29:38] it does look similar to SpecialUserLogin though [13:30:02] coz much of the code has been taken from it [13:30:28] i have removed the Signup stuff from SpecialUserLogin [13:30:56] and now the SpecialUserSignup returns error codes instead [13:35:21] Oh, it's a refactoring of userlogin, I see [13:35:40] So you're separating account creation and login? [13:44:57] yes [13:45:10] I also built an APISignup [13:48:27] OK [13:53:49] so should I make some changes to make that error go? [13:54:02] I have no idea why it would be thrown [13:54:53] well than I am in real trouble :( [13:54:54] I don't see WebRequest::getCookie() in 1.16 though [13:55:03] I recommend developing against trunk rather than 1.16 [13:55:36] If you used SpecialUserlogin from 1.16 as a base for your refactoring, your work is almost certain to need major adaptation before it can be used in trunk [13:55:51] (Because 1.16 is so old) [13:57:36] ok. i ll try with the current version from trunk [16:12:35] I have developed an API as an extension, how can I test it? [16:12:49] this api handles UserSignup [16:33:02] akshayagr, you don't need to do anything special [16:33:12] Just write a small program to send it input [16:33:17] shouldn't take too many lines of code [18:39:20] Reedy: any example files for that? [18:40:10] All you need to do is a HTTP GET/POST against the api, and print the output [18:40:37] hmm... so fopen() should do it? [18:42:20] I suppose... [18:42:37] I know people who do it in chromes dev tools/firebug [18:44:12] You haven't commited the code yet have you? [18:45:25] Reedy: no, i have requested to change my key [18:45:48] jorm will be commiting on my behalf till then [18:46:21] Reedy: i need your help with two bugs [18:47:23] sure [18:47:39] if it's related to that code, if you can get it commited, I can have a look and try to help [18:48:12] i have mailed to jorm to commit it but i guess it will take some time [18:48:19] i use pastebin for the moment [18:48:29] is it ok? [18:48:42] sure, or you can forward it to me, and I can commit it [18:51:23] Reedy: pls pm mail id [18:52:29] Reedy: mail sent [18:54:55] akshayagr, FYI, we only use ?> if we're inlining html etc [18:54:59] not at the end of files [18:55:37] Also, where's the API module? [18:56:55] i could not test it so i didnt attach it [18:56:59] i ll forward now [18:57:48] It's ok to commit untested code, as long as we notify as such :) [18:59:47] i will do so from now :) [19:00:47] Reedy: is it also possible to test our code from SVN? just like I can do on my webserver? [19:01:02] Test it where? [19:02:43] i am not sure if I am asking it right but, what I do is I upload my files in the extension folder on my test wiki at my webserver and then I access it & test it from there, can I do the same on Wikimedia SVN? [19:03:12] Yeah, just have a svn checkout on your webserver [19:06:08] ok, is there not any test wiki on Wikimedia SVN on which I can directly test my extensions? [19:06:30] sometimes my webserver gives some problems and the devs here are unable to access my website [19:07:13] There isn't at the moment unfortunately. The infrastructure to hopefully allow this, is underway though [19:07:26] People can install the extension and test it locally if it's in SVN, so it's slightly easier from here [19:13:02] Any clues on the errors I am getting? [19:14:22] I've just fixed a few minor syntax/related errors [19:14:38] Line 45 of your api module, $signupForm->initUser(); [19:14:43] You're missing parameters [19:15:08] Line 459 of your special page, you're using an undefined variable [19:15:18] Same on line 47 [19:15:23] *477 [19:20:29] akshayagarwal, how do you want me to leave feedback? [19:20:35] for $valid on line 459, i have defined at line 320, but since its a local variable, should I declare that variable on start of the page so that it can be accessed everywhere? [19:20:59] Reedy: anyway you prefer, I am new to it :) [19:21:26] The $valid is in a different function to the one defined on line 320 [19:22:21] yes, so should I declare it on file start where all the variables are declared? [19:24:41] Those are constants [19:24:57] then some member variables [19:25:14] You either pass it as a parameter to the other method, or like you say, define it as a class variable [19:33:38] i prefer class variables, is that performance wise ok? or parameters are better? [19:34:33] it's a case of what best fits [19:34:51] if you were using the method to evaluate against multiple possible variables, passing as a parameter makes more sense [19:34:57] If it's always against one, class is fine [19:57:06] I fixed those 2 errors [19:57:50] Want to send me a patch or whatever and I can commit? [20:23:04] mail sent [20:23:22] we need to fix the other two errors too [20:24:11] bleugh [20:24:16] that's not against the changes i made in svn [20:25:11] but I sent you the updated file [20:25:39] check line58, it has a new variable $mValid [20:26:03] The changes aren't right [20:26:04] if ( is_array( $mValid ) ) { [20:26:11] it's still using a local variable [20:26:20] you need to use $this->mValid to use the class variable [20:26:37] oops, I made noobish mistakes [20:26:51] *akshayagr decides to take up OOP lessons again [20:43:00] do I need to do the same for $abortError? [20:58:33] Reedy: ? [22:15:19] *akshayagr wishes everybody a good night & goes to sleep