Forums / Developer / ezini template operator feature or bug ?

ezini template operator feature or bug ?

Author Message

Davide Garzetti

Wednesday 07 October 2009 8:04:51 am

I have been struggling some time with this:
In a template file this line works as expected

{$myset=ezini( 'messages', 'DefaultMessageType', 'email_handler.ini' ) }

this line does not work

{def $fileini= 'email_handler.ini'
$myset=ezini( 'messages', 'DefaultMessageType', $fileini) }

checkin in ez source code of .tpl files the name of inifile is always hardcoded.

what do you think ? Should I register as a bug ?

Thank you

Davide Garzetti

Wednesday 07 October 2009 8:10:33 am

I have not mentioned is ezpublish 4.2 on php 5.2

Piotrek Karaś

Wednesday 07 October 2009 10:16:37 am

How about:

{def $fileini= 'email_handler.ini'}
{def $myset=ezini( 'messages', 'DefaultMessageType', $fileini)}

?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Davide Garzetti

Wednesday 07 October 2009 12:55:17 pm

It's a bug unresolved since 4.0.

http://issues.ez.no/IssueView.php?Id=15488&activeItem=5

Piotrek Karaś

Wednesday 07 October 2009 2:04:01 pm

The question remains: is it a problem? Unless you have a dynamic ini selection (for example, lots of *.ini files to browse through dynamically), which is very unlikely, this should not be a problem to have the file name hard coded and not passed via variable.

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu