add_form_key before or after?

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
1234homie
Registered User
Posts: 439
Joined: Fri Sep 26, 2008 3:17 pm

add_form_key before or after?

Post by 1234homie »

add_form_key() function should be called before or after check_form_key() ?

I think its good optimizing way is to put it after ;]
User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: add_form_key before or after?

Post by Erik Frèrejean »

It doesn't really matter, add_form_key simply calculates the key and assigns it to the template array. Sure you can optimise things a bit by calling that function only when needed thus not on the "submit" page, although I don't believe you'll really notice this "optimisation"
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)
User avatar
1234homie
Registered User
Posts: 439
Joined: Fri Sep 26, 2008 3:17 pm

Re: add_form_key before or after?

Post by 1234homie »

Erik Frèrejean wrote:It doesn't really matter, add_form_key simply calculates the key and assigns it to the template array. Sure you can optimise things a bit by calling that function only when needed thus not on the "submit" page, although I don't believe you'll really notice this "optimisation"
yeah but.. its always one unneeded call to template assign_vars etc anyway thanks for reply ;]
Locked

Return to “[3.0.x] MOD Writers Discussion”