Saturday, 2011-07-30

*** Quits: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au) (Remote host closed the connection)00:32
*** Quits: roentgen (~arthur@openvpn/community/support/roentgen) (Remote host closed the connection)01:49
*** Joins: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au)01:56
*** Joins: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz)02:42
*** Joins: giallu (~giallu@fedora/giallu)03:55
*** Quits: soustruh (~Miranda@ip-86-49-121-75.net.upcbroadband.cz) (Quit: visit http://wormscesky.cz)03:56
GitHub104[mantisbt] davidhicks force-pushed next from 27d8803 to 8be6cff: https://github.com/mantisbt/mantisbt/commits/next04:08
GitHub104[mantisbt/next] Move config files to application/config directory.  This will be out of the web tree once restructuring is complete. - Daryn Warriner04:08
GitHub104[mantisbt/next] Move core files to application/core.  The .htaccess file will not be needed as this will not be reachable - Daryn Warriner04:08
GitHub104[mantisbt/next] Move Soap api to application/services/soap. - Daryn Warriner04:08
*** Quits: giallu (~giallu@fedora/giallu) (Ping timeout: 240 seconds)05:56
*** Quits: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au) (Remote host closed the connection)06:03
*** Joins: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au)06:12
*** Joins: Paul_ (~IceChat09@2001:470:9310:aaaa:44e5:7a8f:7ba2:4b8c)06:12
dhx1Paul_: hi06:29
Paul_I forgot what the push line was06:31
Paul_you got my mail?06:31
dhx1Paul_: we can't merge your jul29 branch... it's too different :(06:31
dhx1yeah06:31
Paul_cool06:31
dhx1new email address is d@hx.id.au btw06:32
*** Quits: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au) (Remote host closed the connection)06:33
*** Joins: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au)06:35
*** Quits: toddf (~todd@pf.FreeDaemonHosting.com) (Ping timeout: 255 seconds)06:37
dhx1back06:37
Paul_what was push line again06:41
dhx1git push github localbranchname:remotebranchname06:42
dhx1or just: git push github localbranchname06:42
*** Joins: Ragnor_ (~Ragnor@dslb-178-009-168-181.pools.arcor-ip.net)06:42
dhx1if local and remote branch names are the same06:42
*** Quits: Ragnor (~Ragnor@dslb-188-100-046-047.pools.arcor-ip.net) (Ping timeout: 260 seconds)06:43
dhx1Paul_: https://github.com/grangeway/mantisbt/commit/f15b685d53fdc39f492c2420f7b2e82f23062d6d06:57
dhx1actually, never mind06:58
Paul_dhx1: dont worry07:02
dhx1about?07:03
Paul_anything? :)07:03
Paul_I need to nuke db_prepare_int :(07:03
Paul_[More importantly - have I changed enough to pick a new license for mantis yet?]07:04
dhx1haha07:08
dhx1I propose removing caching entirely07:08
Paul_MantisCacheable? :P07:09
Paul_you not like? :P07:09
dhx1unless of course PDO calls to the Database server cache are overly expensive07:09
dhx1well, both old and new07:09
dhx1it seems to be solving a problem that doesn't exist?07:10
Paul_well, in a way, that might happen07:12
Paul_at least07:12
Paul_atm, "MantisCachable" allows either a filesystem or memcache cache07:12
Paul_of an object07:13
Paul_by an id07:13
Paul_effectively, we can make that do nothing and benchmark07:13
Paul_but remember, the caching was to stop us doing a db lookup for each user in history07:14
Paul_as opposed to us needing caching07:14
Paul_$c_project_id = $c_project_id * -1;07:14
Paul_er07:14
Paul_wtf that do07:15
dhx1calling user_get(...) continuously is bad anyway07:15
dhx1when we should be using a specific query to return all the data we need at once07:15
Paul_then you end up with massive joins07:16
Paul_on all tables07:16
dhx1sorry, might have confused things...07:16
Paul_i.e. atm07:16
Paul_we grab a bug07:16
dhx1I mean, instead of multiple queries for user information07:16
Paul_then grab bug history07:16
dhx1we grab a user once and pass it around between functions07:16
dhx1(if needed)07:16
Paul_right07:16
Paul_sry, yea07:17
Paul_we talking in-php caching + offloading07:17
dhx1however things like view_all_bug_page shouldn't need to recreate 30 User objects, one for each username shown on the page?07:17
dhx1mind you, it'd be possible to create a UserFactory static method that returns multiple users from the database in one hit07:18
dhx1so we'd have to weigh that up against a table join07:19
dhx1(where the database can cache the query results anyway)07:19
Paul_i'm going to strip out db_prepare_int [which just does (int)07:21
Paul_this will probably break stuff07:21
Paul_as the caching relies on int(1) != "1"07:21
dhx1wait wait wait :)07:21
dhx1I'm going through cherry-picking your patches onto 'next' and fixing conflicts07:22
dhx1I'd rather we fix that first and then continue work on cleanups07:22
Paul_er07:24
Paul_thought you was waiting for me07:24
dhx1not yet07:26
dhx1do you have any other branches other than july29?07:26
Paul_no - and i just pushed what I did last night to july2907:28
dhx1LDAP, etc?07:28
Paul_ya07:28
dhx1ok07:29
dhx1so far I have skipped:07:29
dhx1Update PHPMailer07:29
dhx1Implement a MantisLanguage Class07:30
dhx1Add MantisUser Class07:30
dhx1Remove old caching07:30
dhx1Remove legacy soap api. This should really go to a plugin, so we can wor...07:30
Paul_tbh, I dont see why we dont just rebase the next changes onto this07:30
dhx1Add MantisCacheable support to bugdata07:30
dhx1and I'm now merging your changes from yesterday07:30
Paul_as the only thing done in 'next' so far is move files about07:30
Paul_so your gonna spend hours trying to merge stuff07:31
Paul_when we could just move files about in 20 seconds07:31
Paul_;/07:31
dhx1it does more than that... renames your classes, makes some changes to them, different autoloading, adds exceptions, misc fixes, etc07:31
Paul_so does the July29 branch though07:31
dhx1"add exceptions" = my work towards creating exception classes (not just using a single class for all errors)07:32
dhx1it extends the work you did a few months ago07:32
Paul_yea, some of which I'd changed locally anyway07:33
Paul_where it might be worth sticking your stuff in07:33
Paul_for example, there's no ERROR_* variables left in the july 29th branch07:34
dhx1what did they change to?07:34
Paul_exceptions07:34
Paul_albeit, maybe in a bad way - but07:34
Paul_i.e. atm, if an exception doesn't exist, it'll auto-create a class in a hacky way07:35
dhx1https://github.com/grangeway/mantisbt/commit/49d1a8a960343718b234c7e3883593d6d971f29d07:35
Paul_but figured that's more useful then having exceptions+errors07:35
dhx1oh I see, you just pushed it07:35
Paul_yea, the language files are a mess for non-english07:35
Paul_and there's a big @FIXME in the autoloader07:35
dhx1I was doing the same thing but was creating the actual Exception classes too :)07:36
Paul_yea, I was kinda wondering if there's an argument for creating some exception classes07:36
Paul_and dynamically doing ones we dont care about07:36
dhx1and I added some other stuff to exceptions such as HTTP return code, exception constructors taking extra arguments/parameters for error messages, etc07:36
Paul_yea, I saw07:37
dhx1IMO we shouldn't by dynamically creating classes07:37
Paul_we dont really want a class for07:37
dhx1if we want a "dynamic" error then we can use the base exception class07:37
Paul_bug_not_found07:37
Paul_user_not_Found07:37
Paul_etc07:37
Paul_so we can translate themt hough07:37
dhx1I'd argue we should07:37
Paul_that means you are going to have 1 exception for everything message string though07:38
Paul_or well, whilst that might be an idea [to create them]07:38
Paul_i'm kinda thinking we should create them towards end rather then now07:38
dhx1yeah, exceptions should be unique so that we can catch them in a unique way within the code07:38
Paul_if you get my drift07:39
Paul_i.e. at the moment, as i've just mapped ERROR_* to 'exception_' and throw mantisbt\exception\foo07:40
Paul_some of the exception names are sill07:40
Paul_+y07:40
dhx1yep I see it07:40
dhx1yeah many of our exceptions need redoing07:40
dhx1most times it's a case of making exceptions more specific and useful07:40
Paul_however, part of me is thinking next hting to do is objects07:40
dhx1AccessDenied is very vague... why is access denied?07:40
Paul_i.e. if you look at MantisUser atm it's a mess07:40
Paul_MantisUser should implement 3 static messages07:41
Paul_erm functions07:41
Paul_MantisUser::get_by_id07:41
Paul_by_relname07:41
Paul_by_username07:41
Paul_by_email07:41
Paul_and then07:41
Paul_new MantisUSer('foo','email','password' or whatever07:41
dhx1https://github.com/grangeway/mantisbt/commit/ac4b21f102503a87e6b916c3ce8d5df87ce0910607:41
dhx1LDAP commit seems... missing?07:41
dhx1we basically need to create a new Mantis user class from scratch07:42
dhx1instead of hacking the old crap into a mega class that isn't really OO07:42
Paul_there should be 207:42
dhx1the User class shouldn't "get" anything from the database07:42
dhx1that is the role of another class, probably with the name "Factory" on the end07:43
dhx1in other words, the User class should work without any consideration of databases07:43
dhx1another class should be responsible for reading and/or writing a User class to the database07:43
dhx1updating too07:44
Paul_at the moment, it's a playground07:44
Paul_i've pretty much dumped all the stuff I had lying around into one place07:44
Paul_there's 3 things I have locally that i've not dumped in that i'm aware of:07:45
Paul_a) a sqlite pdo class07:45
Paul_b) MantisCache*07:45
Paul_[which is 4 files]07:45
Paul_a 'AccessDenied.class.php file with nothing in ;/07:46
Paul_what I was gonna do next is fix up a MantisUSer class in a more sensible way07:47
dhx1ok, well I can continue merging everything so far07:48
dhx1thanks for committing :)07:48
Paul_i'm still not sure there's nothing in 'next' that it's worth trying to merge into07:48
Paul_nothing07:49
Paul_enough07:49
Paul_espcially given i'd be inclined to think we should remove from https://github.com/mantisbt/mantisbt/blob/next/application/core/access_api.php07:50
Paul_the line: use MantisBT\Exception\Access\AccessDenied;07:51
Paul_as that strikes me as there will be a large number of use MantisBT\*07:51
Paul_incidently07:54
Paul_https://github.com/mantisbt/mantisbt/commit/2ff312f3379d2bf648e11e652afd080bd2842ae0#public/core.php07:54
Paul_i'm not sure about that commit07:54
Paul_Remove global php path variables in favor of constants for path configuration.07:54
Paul_These may be configured through the webserver.07:54
Paul_how can the webserver set a php constant? ;/07:55
* Paul_ pokes dhx107:57
dhx1Paul_: here08:03
Paul_how can the webserver set a php constant? ;/08:04
dhx1change a .php file where a constant is set08:04
dhx1I think that is what he meant08:04
dhx1daryn: ping, for reference08:04
Paul_that would mean08:04
Paul_edit core.php08:04
Paul_which is bad08:05
dhx1it's ok because an "application" only needs to be installed once on a web server08:05
Paul_my point is still08:06
Paul_if i'm trying to use the application twice08:06
dhx1multiple MantisBT instances can then be run through the same set of files08:06
Paul_how it works :P08:06
dhx1I haven't looked at this much (Daryn has been working on it)08:06
dhx1however,08:06
dhx1generally we'd look at the hostname to determine which MantisBT configuration file to load08:07
dhx1etc08:07
Paul_yea08:07
Paul_at which point, don't the constants harm us08:07
Paul_and the old method work better? :P08:07
dhx1btw I want to remove DIRECTORY_SEPARATOR... it's not needed08:08
Paul_I'm not convinced08:08
Paul_from what I've found08:08
dhx1http://us2.php.net/manual/en/ref.filesystem.php#7395408:08
dhx1+ many other Google hits08:08
Paul_i've found some of the php stuff fail if it's the wrong way around08:09
dhx1it can be an issue in some places08:10
Paul_although I wonder once we have more classes etc08:10
dhx1mostly when we're reading paths from the filesystem and they contain backslashes08:10
Paul_whether we use it08:10
dhx1(if that still occurs anywhere)08:10
dhx1nah it's something that's not needed in 99% of cases (maybe even 100%)08:10
Paul_think i'm goinna go back to coding08:12
dhx1would really prefer if we can get 'next' up to date as much as possible08:14
dhx1I can reimplement your exceptions patch08:14
dhx1and I've mostly merged db_get_table08:14
dhx1(still going)08:14
dhx1$p_query = db_prefix_tables( $p_query );08:14
Paul_seriously though08:15
dhx1never mind, I see what it does08:15
Paul_it's gotta be easier to merge the other way08:15
*** Joins: soustruh (~Miranda@ip-78-102-69-201.net.upcbroadband.cz)08:20
dhx1not really, it's ugly either way08:21
Paul_i'm gonna try08:22
Paul_as I think it might be quite quick08:23
dhx1also remember that your commits are from the 'master' branch as of April this year (or thereabouts)08:26
Paul_that's fine08:26
Paul_nothing much changed in master08:26
dhx1you'd be surprised ;)08:26
Paul_http://git.mantisforge.org/w/mantisbt.git?a=shortlog08:26
Paul_there were 7 commits from April to 1st July08:27
Paul_4 of which are todo with soap08:27
Paul_1 was ldap08:27
Paul_5 of which were soap08:27
dhx1ok ;)08:29
dhx1'next' has diverged a fair bit though08:29
jreeseI see a lot of commits after july 1st though...08:30
jreesehttps://github.com/mantisbt/mantisbt/commits/master08:30
dhx1yeah there are a lot ;)08:35
Paul_not a problem08:37
Paul_some of the bug fixes in july look invalid08:57
*** Quits: soustruh (~Miranda@ip-78-102-69-201.net.upcbroadband.cz) (Quit: visit http://wormscesky.cz)09:04
*** Joins: toddf (~todd@pf.FreeDaemonHosting.com)09:10
*** Quits: thraxisp (~thraxisp@24-246-24-251.cable.teksavvy.com) (Quit: thraxisp)09:13
*** Quits: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au) (Remote host closed the connection)09:26
*** Joins: dhx1 (~anonymous@60-242-108-164.static.tpgi.com.au)09:46
dhx1jreese: can you add "grangeway" to the mantisbt organisation on Github?10:01
Paul_dhx: explain the factory thing10:04
dhx1Paul_: a "Factory" class is an OO pattern used for creating classes10:05
dhx1so a UserFactory would likely contain static methods that create a User class10:05
Paul_ahh10:05
Paul_interesting10:05
Paul_so these methods get moved10:06
dhx1and you'd likely have different "factories" for creating User classes from different sources10:06
Paul_:)10:06
*** Joins: soustruh (~Miranda@169.211.broadband13.iol.cz)10:06
dhx1UserDatabaseFactory = create a User class from a database connection10:06
dhx1UserXMLFactory = create a User class from an XML representation10:06
dhx1etc10:06
dhx1that way you keep the User class decoupled from databases, XML, etc10:07
Paul_xml storage for mantis10:09
Paul_no db required10:09
dhx1it's not that easy10:09
dhx1because you'd need to search that XML data10:10
dhx1that's a *long* way down the track10:10
Paul_argh10:13
Paul_:(10:13
Paul_I love white pages10:13
Paul_i'm guessing you wont be able to see factory idea before you go to bed ;/10:29
dhx1Paul_: db_insert_id...?10:41
Paul_?10:41
dhx1see tokens_create() within tokens_api.php10:41
dhx1it calls:10:41
dhx1return db_insert_id( $t_tokens_table );10:41
Paul_that gets fixed  in a later commit10:42
dhx1hmm replacing the argument with 'tokens'10:42
dhx1seems ok10:42
Paul_that gets fixed  in a later commit10:42
Paul_^^10:42
dhx1ok10:42
Paul_as I have:10:42
Paul_return db_insert_id( '{tokens}' );10:42
Paul_here10:42
Paul_for that same line10:42
dhx1btw10:43
dhx1https://github.com/grangeway/mantisbt/commit/cc31f0a9d5689c8827e3865fbeb321bda92ec36310:43
dhx1is bad10:43
Paul_which bit10:44
Paul_also10:44
dhx1because the date_set_timezone function in date_api calls date_get_default_timezone prior to us setting one10:44
dhx1which produces a PHP warning10:44
Paul_mm, ok - ler me rework that a 3rd time10:45
Paul_:)10:45
dhx1why do we need to remember the default timezone?10:46
dhx1it's not like we're going to pop it off the stack10:46
Paul_so we can restore back to it10:47
Paul_ofc, we are ignoring the fact that php now requires timezone to be set anyway10:48
Paul_so it should really be set on server10:48
*** Quits: daryn (~daryn@h103.155.16.98.dynamic.ip.windstream.net) (Ping timeout: 260 seconds)11:20
*** Joins: daryn (~daryn@h180.66.29.71.dynamic.ip.windstream.net)11:33
*** Joins: ZettaGeek (475fdd1a@gateway/web/freenode/ip.71.95.221.26)12:03
ZettaGeekHey Guys12:03
ZettaGeekI have some questions.. Is anyone here?12:03
ZettaGeekHello?12:14
GitHub179[mantisbt] davidhicks pushed 1 new commit to next: https://github.com/mantisbt/mantisbt/commit/d726b95b0b80fa94b9d4509e22b764d886ff3e5112:17
GitHub179[mantisbt/next] Minor database fixups - David Hicks12:17
ZettaGeekHello anyone?!?12:27
*** Ragnor_ is now known as Ragnor12:37
ZettaGeekHello?12:47
ZettaGeekAnyone here?13:08
*** Quits: siebrand (~siebrand@5353A6DC.cm-6-4c.dynamic.ziggo.nl) (Read error: Connection reset by peer)14:46
*** Joins: siebrand (~siebrand@5353A6DC.cm-6-4c.dynamic.ziggo.nl)14:46
Paul_siebrand: lo15:06
darynPaul_,15:20
darynlo15:20
Paul_lo15:20
Paul_whats up15:20
darynjust scanning your conversation with dhx15:21
Paul_the15:21
Paul_"i'm bored for a week again"?15:21
daryndiscussing next, db, and exceptions stuff15:23
darynthe path variables are defaulted in the app if the webserver hasn't set an environment variable15:24
Paul_i'm not sure about that15:24
daryntalk to Zend about it15:24
Paul_a) your using constants atm not environment variable15:24
Paul_b) not sure how that works on windows15:25
daryni haven't tried on Windows but it is the setup explained by Zend.15:26
Paul_url15:26
Paul_daryn: zend uses a .ini file it loads in via Zend_Registry no?15:30
Paul_think i'll look at what lithium does15:30
darynit does have a zend directory but I just copied how they setup the index file15:31
daryni mean a .ini file15:31
daryntrying to find it now. i don't see it in explained in the quickstart. probably is just in the code15:31
darynyeah it's in the index.php code15:33
darynok...i see a difference. that's a bug in how i did APPLICATiON_PATH15:34
Paul_i'm gonna look at what lithium does15:34
Paul_did you see the results of my blitz so far?15:34
daryndidn't really look closely15:34
Paul_stuff got nuked15:35
daryni've been playing with lithium. really like it15:35
Paul_function user_increment_failed_login_count( $p_user_id ) {15:35
Paul_bah15:35
darynyeah15:35
Paul_$query = "UPDATE {user} SET failed_login_count=failed_login_count+1 WHERE id=%d";15:35
Paul_can we use lithium wihtout their db framework?15:36
Paul_or not relaly15:36
darynyes15:36
darynyou can substitute about anything15:36
darynquite easily15:36
Paul_anyway15:38
Paul_atm, i'm having a massive blitz15:38
Paul_daryn: atm, i'm less fussed about 'next' and more fussed about trying to tidy up code16:18
darynPaul_, ya16:20
Paul_i'm trying to add a 'USER' object atm16:22
ZettaGeekHello??16:51
ZettaGeekAnyone here?!?16:51
Paul_?17:01
ZettaGeekhey Paul17:01
ZettaGeekI have a quick question17:01
ZettaGeekAbout Mediawiki integration with mantis17:01
ZettaGeekis it possible for Mantis to create nicer titles when creating wiki pages in MW?17:02
Paul_i've not looked at that integration17:08
Paul_so can't really help too much there17:08
ZettaGeekok17:08
ZettaGeekWhat is this for: $g_wiki_root_namespace = 'mantis'; ?17:11
ZettaGeekWhat does it mean rather?!?17:13
Paul_i've never used the wiki integration17:21
ZettaGeekThank you anyway17:28
ZettaGeekOk17:28
*** Joins: roentgen (~arthur@openvpn/community/support/roentgen)18:02
*** Quits: ZettaGeek (475fdd1a@gateway/web/freenode/ip.71.95.221.26) (Quit: Page closed)18:18
*** Quits: soustruh (~Miranda@169.211.broadband13.iol.cz) (Quit: visit http://wormscesky.cz)19:39
*** Quits: scribe9343423 (~scribe934@static.96.23.63.178.clients.your-server.de) (Remote host closed the connection)20:00
*** Joins: scribe9343423 (~scribe934@static.96.23.63.178.clients.your-server.de)20:00
Paul_To git@github.com:grangeway/mantisbt.git20:29
Paul_ ! [rejected]        db -> july29 (non-fast-forward)20:29
Paul_error: failed to push some refs to 'git@github.com:grangeway/mantisbt.git'20:29
Paul_huh20:29
Paul_nn20:30
*** Quits: Paul_ (~IceChat09@2001:470:9310:aaaa:44e5:7a8f:7ba2:4b8c) (Quit: Easy as 3.14159265358979323846...)20:31
GitHub31[mantisbt] vboctor pushed 1 new commit to master-1.2.x: https://github.com/mantisbt/mantisbt/commit/aea5691d20595951e49857a4e91b343b27ae98ca20:47
GitHub31[mantisbt/master-1.2.x] Fixes #13190: View page doesn't honor view_handler_threshold threshold. - Victor Boctor20:47
GitHub134[mantisbt] vboctor pushed 1 new commit to master: https://github.com/mantisbt/mantisbt/commit/699480c4cfbf4b6a02c151d165a2588f05e4343520:54
GitHub134[mantisbt/master] Fixes #13190: View page doesn't honor view_handler_threshold threshold. - Victor Boctor20:54
*** Joins: micahg (~micahg@ubuntu/member/micahg)23:17
*** Quits: micahg (~micahg@ubuntu/member/micahg) (Ping timeout: 264 seconds)23:58

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!