Re: [Koha-devel] $query vs $query

2009-07-09 Thread Mason James
> > On Thu, Jul 9, 2009 at 12:16 PM, Marc > Chantreux wrote: >> hello koha coders, >> >> Koha naming convention drove us to a stupid bug: $query is used >> both for >> the CGI object and the SQL statements. >> >> 1. Change the sql statement name >> a) to $statement >> b) to $sql >> c) to

Re: [Koha-devel] $query vs $query

2009-07-09 Thread Joe Atzberger
> > Some of these entries are due to older, crustier parts of the API that > still > > require passing $dbh, which is fairly easy to fix. > > Fixing the remaining API calls that require $dbh to be passed would be > a good first step. Several of my patches pending do exactly this.

Re: [Koha-devel] $query vs $query

2009-07-09 Thread Galen Charlton
Hi, 2009/7/9 Jesse : > 2009/7/9 Kyle Hall >> Is there any way to limit access to Context->dbh to only the C4 >> Modules? Being able to enforce coding guidelines would be nice. > This might, in theory, be possible. It might be easier to simply excise the > offending statements, however. I agree.

Re: [Koha-devel] $query vs $query

2009-07-09 Thread Galen Charlton
Hi, On Thu, Jul 9, 2009 at 12:40 PM, Ryan Higgins wrote: > I agree with Joe. > > If we were to adopt a coding guideline out of this, > it should be that only C4 modules may call Context->dbh(). > > And it wouldn't bother me to see CGI objects renamed as $cgi. I agree with Joe and Ryan. Regards,

Re: [Koha-devel] $query vs $query

2009-07-09 Thread Jesse
2009/7/9 Kyle Hall > Is there any way to limit access to Context->dbh to only the C4 > Modules? Being able to enforce coding guidelines would be nice. > > Kyle > > http://www.kylehall.info > Information Technology > Crawford County Federated Library System ( http://www.ccfls.org ) > This might,

Re: [Koha-devel] $query vs $query

2009-07-09 Thread Kyle Hall
Is there any way to limit access to Context->dbh to only the C4 Modules? Being able to enforce coding guidelines would be nice. Kyle http://www.kylehall.info Information Technology Crawford County Federated Library System ( http://www.ccfls.org ) On Thu, Jul 9, 2009 at 1:40 PM, Ryan Higgins w

Re: [Koha-devel] $query vs $query

2009-07-09 Thread Ryan Higgins
I agree with Joe. If we were to adopt a coding guideline out of this, it should be that only C4 modules may call Context->dbh(). And it wouldn't bother me to see CGI objects renamed as $cgi. Ryan 2009/7/9 Joe Atzberger : > 3) Both are valid. > > For the most part, SQL should be in C4 modules, a

Re: [Koha-devel] $query vs $query

2009-07-09 Thread Joe Atzberger
3) Both are valid. For the most part, SQL should be in C4 modules, and only .pl scripts should have CGI objects. I am fine with 2a, using $cgi as a variable name, too, but I wouldn't spend much time on this. -- Joe Atzberger LibLime - Open Source Library Solutions On Thu, Jul 9, 2009 at 12:16

Re: [Koha-devel] $query vs $query

2009-07-09 Thread Kyle Hall
I would go with 1b and 2a myself. Kyle http://www.kylehall.info Information Technology Crawford County Federated Library System ( http://www.ccfls.org ) On Thu, Jul 9, 2009 at 12:16 PM, Marc Chantreux wrote: > hello koha coders, > > Koha naming convention drove us to a stupid bug: $query is u