Problem with custom resource compiled filenames
Ivo Jansch <[email protected]> Mon, 22 Aug 2005 12:29:01 +0200
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
-----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 <[email protected]>
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-----
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php