Re: [SMARTY] Re: [SMARTY-GENERAL] Plugindir

From: Date: Tue, 09 Apr 2002 21:28:59 +0000
Subject: Re: [SMARTY] Re: [SMARTY-GENERAL] Plugindir
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3600@lists.php.net to get a copy of this message
Andrei Zmievski wrote:
No, it can't. Consider what happens, with your suggestion, when a template uses modifier 'foo' and the modifier is implemented as a plugin. At compilation time you check for plugin's existence and when _load_plugins() is called it will only load the file without checking for anything. It will work fine the first time, but subsequently the compilation does not happen until the template is updated. The plugin file, however, may have been removed and now _load_plugin() will produce a bunch of PHP error messages.
you could check the file_existance again at run-time, you still don't need to scan for plugins in several directories. another problem could be a moved plugin. you would have to recompile the template to get the new location. any other suggestions avoiding scanning for plugins at run-time? -- andreas kossmeier bergfex.at - http://www.bergfex.at

« previous php.smarty.general (#3600) next »