Problem with custom resource compiled filenames
| From: | Ivo Jansch | Date: | Mon, 22 Aug 2005 10:29:01 +0000 |
| Subject: | Problem with custom resource compiled filenames | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-2762@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'm using a custom string resource, so I can do things like:
fetch("string:This is a $template")
I'm running into a problem that might be a problem for other custom
resources as well. The compiler writes the compiled version of the
template to a file, but with custom resources, the template name may be
something other than a valid filename. In the case of my string resource
as in the example above, the template filename would contain the actual
string in it's filename.
Ofcourse, this fails in smarty/core/core.write_file.php on line 46,
where the rename command silently fails.
I think, there should be some filename mangling when writing or reading
the file.
I tried setting the first param of my smarty_resource_string_resource
method to 'by reference', and then have the resource function come up
with a valid name, but Smarty does not pick this up.
Monte, do you know of a correct way to solve this? I'd be happy to
contribute a fix, just point me to the proper place where to solve this.
Greetings,
Ivo
- --
Ivo Jansch <ivo@ibuildings.nl>
ibuildings.nl BV - information technology
http://www.ibuildings.nl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDCajt95NUnGFZm9cRAuFtAJ0X5qhWIIgHHdZT6v6DB9Sw1RhnvQCfYsTC
HraEQfFsU7b9fzP2nD71n68=
=E+im
-----END PGP SIGNATURE-----