Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

setPluginsDir instead or plugins_dir?

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
jimbross
Smarty n00b


Joined: 13 Jul 2011
Posts: 1

PostPosted: Wed Jul 13, 2011 2:59 pm    Post subject: setPluginsDir instead or plugins_dir? Reply with quote

Which is the recommended way to pass an array of plugin directories in Smarty, v.3.0.8:

setPluginsDir or plugins_dir?
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Wed Jul 13, 2011 3:15 pm    Post subject: Reply with quote

setTemplateDir() is the favoured way. We did not update all the docs to reflect that, yet.
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7367
Location: Lincoln Nebraska, USA

PostPosted: Wed Jul 13, 2011 3:18 pm    Post subject: Reply with quote

Both approaches technically work in 3.0.8. Ultimately it is good practice to use setPluginsDir() so that any internal sanitization will be addressed. 3.1+ enforces the use of this method. Direct access will still work, albeit slower since it gets caught and funneled through the setter.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP