Monday, June 17, 2013

Re: SaaS and AppController

Thx AD  

     I didnt realize the placeholders I had in the layout were the culprit

Eric

On Monday, June 17, 2013 9:19:31 AM UTC-4, AD7six wrote:


On Monday, 17 June 2013 14:53:26 UTC+2, Eric Haskins wrote:
I have an app I am working on and I was wondering if this is the designed behavior.   As usual my controllers extend AppController I use the beforeFilter() to determine the site the request is for and setup the environment widgets,auth etc.

My concern is if I put a mail() in the beforeFilter and call the app I get 9 emails for one request.

if you log $this->here, you'll almost certainly find that there are 9 emails for 9 requests (/expected/url, /expected/url/css/missing.css, /expected/url/js/missing.js, etc.); that or there are 8 requestAction calls. Cake calls the beforefilter only once per request.

AD

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: