Re: Two bugs in Smarty 2.3.0

From: Date: Thu, 15 Aug 2002 20:46:52 +0000
Subject: Re: Two bugs in Smarty 2.3.0
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-245@lists.php.net to get a copy of this message
In the future, please post this kind of thing to smarty-dev mailing list, it lets all the developers get in the discussion. I'll CC: it there for now. Thanks! Tomáš Kuba wrote:
Hello, I found two bugs in ver. 2.3.0 of your Smarty template engine: :::::::::::::::::::: 1 ::::::::::::::::::::::::: Bug :: Something goes wrong when I try to load config file (config_load()) with a global scope in a template whitch should be nested (fetched) in it's parent template. Fix :: Sorry but I don't know that.
Can you give an example?
:::::::::::::::::::: 2 ::::::::::::::::::::::::: BUG :: When you are setting your debug_tpl variable you wrongly looking for this debug template in patch "file:".SMARTY_DIR."debug.tpl". But this patch is not correct because at the default (debug.tpl is in the same directory as the smarty.class.php) it should be "file:debug.tpl". Simply relatively to Smarty class but not to the script which is setting the SMARTY_DIR FIX :: This could be fixed realy simple yust remove the ".SMARTY_DIR." constant from your default asset of this variable.
By default, the debug.tpl file is in the same directory as Smarty.class.php, which it needs the SMARTY_DIR constant to find it. file:debug.tpl will look in the template directory.
BTW: Why don't Smarty class support the config_load funcion which could be called from the Php script? I'm trying to use your config files like the language files for my portal. Maybe you add some support for this thay in you next version.
You can, I think it is outlined in the FAQ on the Wiki site right now, we'll get that in the docs at some point. http://smarty.incutio.com/?page=SmartyFrequentlyAskedQuestions
Tomáš Kuba                          
     oooo (0o0) oooo
tomas.kuba@tiscali.cz
     Czech Republic
------------------
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

« previous php.smarty.dev (#245) next »