Extending Cake Shell Classes

2009-10-14 Thread vb13
I have a number of shell scripts and they share common functions so I though it would be smart to have a common base class MyShell that extends Shell and have all my classes extend MyShell. Well, it turns out if I do so, initialize() method of subclasses is not getting called. See line 316 in the

Re: afterFind() inconsistencies ?

2009-09-16 Thread vb13
My colleague just pointed out to me that afterFind() passes another parameter $primary that is supposed to help (see http://book.cakephp.org/view/681/afterFind). However I see it unitialized when it is supposed to be true. On Sep 16, 5:23 pm, vb13 wrote: >  iFeghali, > > I have a

Re: afterFind() inconsistencies ?

2009-09-16 Thread vb13
iFeghali, I have a somewhat similar problem. I have spent today an hour or two looking into how Cake handles db queries for hasMany vs. hasOne or belongsTo relationships. Hopefully this will help you to understand why are you seeing what you are seeing. Cake processes hasMany and hasOne, belon

Re: Loosing SESSION When Transitioning from https to http Using Session Component

2009-08-17 Thread vb13
uot; view? > > On Mon, Aug 17, 2009 at 10:22 AM, vb13 wrote: > > > I have a User Edit page that submits data over https /user/edit. The > > controller saves data and redirects via http to /user/view. > > > In the process I use php session to read/write some data. If I ac

Loosing SESSION When Transitioning from https to http Using Session Component

2009-08-17 Thread vb13
I have a User Edit page that submits data over https /user/edit. The controller saves data and redirects via http to /user/view. In the process I use php session to read/write some data. If I access session data using Cake Session component, I loose my session. As a result I get redirected to a

Re: Form Helper in 1.2.0.7962 Does not Hide Id's

2009-01-09 Thread vb13
No, not to my knowledge On Jan 8, 5:46 pm, Gwoo wrote: > Can you pinpoint where the change happened? I am not aware of any > changes to form between RC3 and Final that would affect the usage. > Perhaps you were using form->hidden() before? --~--~-~--~~~---~--~~ Y

Form Helper in 1.2.0.7962 Does not Hide Id's

2009-01-08 Thread vb13
I have the following line of code in my view: input('Preview.id'); ?> In 1.2 RC3 this used to generate the following html: But in 1.2 final it generates the following HTML: Id Why? I have this in many places. I now have to change my code to input('Preview.id', array('type'=>'hidden')); ?

Dynamically Generating Limit in Pagination

2008-11-10 Thread vb13
Hi all, I have an interesting problem regarding pagination. I develop a system to display reports sourced by a 3d party (jasper, although this is not important). I have 1 reports controller and Reports model (and a Jasper datasource). The controller retrieves reports by name. The model provides

Using mysql now() on save() in 1.2 RC2

2008-07-07 Thread vb13
HI all, there is already a thread http://groups.google.com/group/cake-php/browse_thread/thread/fb93a2e5241c719/cc219332a9756281?lnk=gst&q=now()#cc219332a9756281 that recommends using a cake 'escape' !-' to use now() function literally, and not quoted but this does not work in RC2. The value is st

Re: Inserting secure urls or actions

2008-01-24 Thread vb13
> > On Jan 23, 6:34 pm, vb13 <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > I am struggling with the following (I hope simple) issue in 1.2 > > > I have a login form that has to post via https. I would like to use > > cake controller/action url notation a

Inserting secure urls or actions

2008-01-23 Thread vb13
Hi all, I am struggling with the following (I hope simple) issue in 1.2 I have a login form that has to post via https. I would like to use cake controller/action url notation and let the framework generate a full https://... URL. I.e. in my template I have code https://www.foo.com/user/log