>i am not familiar with the detailed current handling of configuration in
>the session, but IMHO this should only be required once per session

Great idea, Sebastian!

Fetching settings from db only once per session would be vital in decreasing server load and further increasing performance.

I believe Marc Delisle also suggested this. 

I will see how I can go about implementing this.  Thanks!

Also, I found a minor bug in my code.  Extracted db value for LoginCookieValidity turns out to be non-INT type by default.  So, if you have tried running the script, you may have realized that your session breaks in less than expected time. 
Multiplying db value by 1 should do the trick.

--------------------------------------------------
Best regards,
Zeeshan Mughal
Email:  zeeshanmughal@ieee.org
Web:  http://www.zixan.info


On Thu, Aug 13, 2009 at 2:08 AM, Sebastian Mendel <lists@sebastianmendel.de> wrote:
>
> On 13.08.2009 07:21, Zeeshan M. wrote:
> >  >you should try to replace this .... with a single function call, e.
> > g.: $GLOBALS['cfg']['PropertiesNumColumns'] =
> > PMA_permUsrPrefGet('PropertiesNumColumns');
> >
> > This would help put the code in one central location.  This is probably
> > better than having the code scattered all over.
>
> yes
>
> > But I don't think it
> > would help reduce the amount of code being written, if it were one of
> > the goals.  Some of the settings are not directly applied to global
> > config vars so they have to go through conditional statements.
>
> btw. why do you not just apply all user settings at once?
>
> i am not familiar with the detailed current handling of configuration in
> the session, but IMHO this should only be required once per session
>
> even if this is not an option, in most cases you set only one user
> option and this could be done with a single function call
>
>
>
>
> i would suggest include the user pref class in common.inc.php and apply
> all user settings at once, additionally i would move all related code
> into the class (except the initial call of course)
>
> Michal, what do you think?
>
>
> --
> Sebastian Mendel
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel