|
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 |
alan Smarty Regular
Joined: 17 Apr 2003 Posts: 43
|
Posted: Tue Sep 30, 2003 6:30 pm Post subject: Possible bug in smarty_core_assemble_plugin_filepath |
|
|
It appears that by having a plugin named the same as one of the built-in plugins (for example modifier.date_format.php) in order to override or extend some of its facilities does not work as expected in 2.6.0-RC1.
The smarty_core_assemble_plugin_filepath function, responsible for loading plugins, whilst it finds the appropriate plugin, does not immediately return, but instead continues to check ALL the plugin directories and uses the relevant plugin from the LAST matching directory.
This appears at first glance to be a waste of time, however it is only slowing down the compilation phase due to the caching of paths.
Initially I was confused by this as I was used to placing my own plugins directory before smarty's own directory, i.e.:
Code: | $plugins_dir = array('my_plugins', 'plugins'); |
which makes more sense to me in that this statement would appear to suggest that plugins would be taken from my_plugins folder in preference to the plugins folder.
The current workaround (at least without modifying the core code) is just to put my plugins folder AFTER smarty's. (although as I mentioned above, this does incur a slight speed penalty). |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
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
|