Re: need to show debug only if admin - Configure::write('debug', 3); only if admin logged in

2009-05-18 Thread JamesF

i think what this issue is coming down to is me working off an alias
of my live site and keeping that in debug modethis is probably for
the best since my site is live now and i shouldn't be mucking around
while people are using it.

On May 18, 2:51 pm, JamesF  wrote:
> @Martin
>
> even if i remove the conditional and set Configure::write('debug', 2)
> in beforeFilter on its own...still no sql is shown. says
> (default) 0 query took ms
>
> On May 18, 12:22 pm, Martin Westin  wrote:
>
> > That might be undesirable since any notices or errors before
> > beforeRender will be in his output.
>
> > @JamesF:
> > Did you put the if-clause at the top of beforeFilter or at the bottom?
> > Your if will return false if Auth has not had a chance to do it's
> > thing. Check that you did NOT put it before Auth initializes.
> > (you will probably be missing the user table slq in your output in
> > this case but the rest should be there)
>
> > On May 18, 4:53 pm, nurvzy  wrote:
>
> > > Try reversing it. debug:3 in the core and turn it off beforeRender if
> > > you're NOT admin.
>
> > > On May 17, 4:41 pm, JamesF  wrote:
>
> > > > hello all, i love cakephp's built in table that shows the sql queries
> > > > that are running. my site is now live but i need a way to check under
> > > > the hood without disrupting my users.
>
> > > > here is what i put in the beforeRender function of my app_controller:
>
> > > >  function beforeRender(){
>
> > > >  if ($this->Auth->user('role') == 'admin'){
>
> > > >  Configure::write('debug', 2);
> > > >  } else {
> > > >  //
> > > >  }
>
> > > > i have Configure::write('debug', 0) set in my core.php
>
> > > > now this pulls up that sql table thing at the bottom of the screen but
> > > > it is EMPTY. it says (default) 0 query took ms.
>
> > > > anyone have a solution?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: need to show debug only if admin - Configure::write('debug', 3); only if admin logged in

2009-05-18 Thread JamesF

@Martin

even if i remove the conditional and set Configure::write('debug', 2)
in beforeFilter on its own...still no sql is shown. says
(default) 0 query took ms


On May 18, 12:22 pm, Martin Westin  wrote:
> That might be undesirable since any notices or errors before
> beforeRender will be in his output.
>
> @JamesF:
> Did you put the if-clause at the top of beforeFilter or at the bottom?
> Your if will return false if Auth has not had a chance to do it's
> thing. Check that you did NOT put it before Auth initializes.
> (you will probably be missing the user table slq in your output in
> this case but the rest should be there)
>
> On May 18, 4:53 pm, nurvzy  wrote:
>
> > Try reversing it. debug:3 in the core and turn it off beforeRender if
> > you're NOT admin.
>
> > On May 17, 4:41 pm, JamesF  wrote:
>
> > > hello all, i love cakephp's built in table that shows the sql queries
> > > that are running. my site is now live but i need a way to check under
> > > the hood without disrupting my users.
>
> > > here is what i put in the beforeRender function of my app_controller:
>
> > >  function beforeRender(){
>
> > >  if ($this->Auth->user('role') == 'admin'){
>
> > >  Configure::write('debug', 2);
> > >  } else {
> > >  //
> > >  }
>
> > > i have Configure::write('debug', 0) set in my core.php
>
> > > now this pulls up that sql table thing at the bottom of the screen but
> > > it is EMPTY. it says (default) 0 query took ms.
>
> > > anyone have a solution?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: need to show debug only if admin - Configure::write('debug', 3); only if admin logged in

2009-05-18 Thread Martin Westin

That might be undesirable since any notices or errors before
beforeRender will be in his output.

@JamesF:
Did you put the if-clause at the top of beforeFilter or at the bottom?
Your if will return false if Auth has not had a chance to do it's
thing. Check that you did NOT put it before Auth initializes.
(you will probably be missing the user table slq in your output in
this case but the rest should be there)



On May 18, 4:53 pm, nurvzy  wrote:
> Try reversing it. debug:3 in the core and turn it off beforeRender if
> you're NOT admin.
>
> On May 17, 4:41 pm, JamesF  wrote:
>
> > hello all, i love cakephp's built in table that shows the sql queries
> > that are running. my site is now live but i need a way to check under
> > the hood without disrupting my users.
>
> > here is what i put in the beforeRender function of my app_controller:
>
> >  function beforeRender(){
>
> >  if ($this->Auth->user('role') == 'admin'){
>
> >  Configure::write('debug', 2);
> >  } else {
> >  //
> >  }
>
> > i have Configure::write('debug', 0) set in my core.php
>
> > now this pulls up that sql table thing at the bottom of the screen but
> > it is EMPTY. it says (default) 0 query took ms.
>
> > anyone have a solution?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: need to show debug only if admin - Configure::write('debug', 3); only if admin logged in

2009-05-18 Thread nurvzy

Try reversing it. debug:3 in the core and turn it off beforeRender if
you're NOT admin.


On May 17, 4:41 pm, JamesF  wrote:
> hello all, i love cakephp's built in table that shows the sql queries
> that are running. my site is now live but i need a way to check under
> the hood without disrupting my users.
>
> here is what i put in the beforeRender function of my app_controller:
>
>  function beforeRender(){
>
>  if ($this->Auth->user('role') == 'admin'){
>
>  Configure::write('debug', 2);
>  } else {
>  //
>  }
>
> i have Configure::write('debug', 0) set in my core.php
>
> now this pulls up that sql table thing at the bottom of the screen but
> it is EMPTY. it says (default) 0 query took ms.
>
> anyone have a solution?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: need to show debug only if admin - Configure::write('debug', 3); only if admin logged in

2009-05-17 Thread JamesF

just tried this..still getting the same empty result

On May 17, 7:58 pm, brian  wrote:
> That's because you have it in beforeRender(). By that time, all DB
> access has come and gone and all that's left is to render the page.
> You could try it in beforeFilter(), which fires before the action is
> entered.
>
> On Sun, May 17, 2009 at 7:41 PM, JamesF  wrote:
>
> > hello all, i love cakephp's built in table that shows the sql queries
> > that are running. my site is now live but i need a way to check under
> > the hood without disrupting my users.
>
> > here is what i put in the beforeRender function of my app_controller:
>
> >                function beforeRender(){
>
> >                          if ($this->Auth->user('role') == 'admin'){
>
> >                                        Configure::write('debug', 2);
> >                          } else {
> >                                 //
> >                          }
>
> > i have Configure::write('debug', 0) set in my core.php
>
> > now this pulls up that sql table thing at the bottom of the screen but
> > it is EMPTY. it says (default) 0 query took ms.
>
> > anyone have a solution?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: need to show debug only if admin - Configure::write('debug', 3); only if admin logged in

2009-05-17 Thread brian

That's because you have it in beforeRender(). By that time, all DB
access has come and gone and all that's left is to render the page.
You could try it in beforeFilter(), which fires before the action is
entered.

On Sun, May 17, 2009 at 7:41 PM, JamesF  wrote:
>
> hello all, i love cakephp's built in table that shows the sql queries
> that are running. my site is now live but i need a way to check under
> the hood without disrupting my users.
>
> here is what i put in the beforeRender function of my app_controller:
>
>                function beforeRender(){
>
>                          if ($this->Auth->user('role') == 'admin'){
>
>                                        Configure::write('debug', 2);
>                          } else {
>                                 //
>                          }
>
> i have Configure::write('debug', 0) set in my core.php
>
> now this pulls up that sql table thing at the bottom of the screen but
> it is EMPTY. it says (default) 0 query took ms.
>
> anyone have a solution?
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



need to show debug only if admin - Configure::write('debug', 3); only if admin logged in

2009-05-17 Thread JamesF

hello all, i love cakephp's built in table that shows the sql queries
that are running. my site is now live but i need a way to check under
the hood without disrupting my users.

here is what i put in the beforeRender function of my app_controller:

function beforeRender(){

  if ($this->Auth->user('role') == 'admin'){

Configure::write('debug', 2);
  } else {
 //
  }

i have Configure::write('debug', 0) set in my core.php

now this pulls up that sql table thing at the bottom of the screen but
it is EMPTY. it says (default) 0 query took ms.

anyone have a solution?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---