|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
alexlehm Smarty n00b
Joined: 10 Feb 2012 Posts: 1
|
Posted: Fri Feb 10, 2012 12:40 pm Post subject: Plugins smarty 2->3 migration issue |
|
|
I had an issue when migrating my code from Smarty 2 to Smarty 3.1, I wonder if this is properly explained in the documentation:
in Smarty 2 the apparently common way to set a plugin dir was
$smarty->plugins_dir[] = '...';
this used to set a user plugin dir and kept smarty's own plugin dir in the list.
in Smarty 3.1 the variable plugins_dir is no longer accessible, so I figured the obvious replace is setPluginDir, however this overwrites the directory already set for the smarty plugins, removing escape etc.
The correct solution is to use addPluginDir, but that isn't obvious from the documentation. |
|
Back to top |
|
noiselabs Smarty n00b
Joined: 04 Dec 2011 Posts: 4
|
Posted: Sun Feb 12, 2012 2:39 am Post subject: |
|
|
You are right. addPluginsDir() is the way to go.
There is a note about the migration to 3.1 and the deprecation of $plugins_dir[] usage here. |
|
Back to top |
|
|
|
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
|