Re: [SMARTY-DEV] Problem with custom resource compiled filenames
| From: | Ivo Jansch | Date: | Mon, 22 Aug 2005 10:51:11 +0000 |
| Subject: | Re: [SMARTY-DEV] Problem with custom resource compiled filenames | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2763@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
Ivo Jansch wrote:
> 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.
It appears, that in _get_auto_filename in Smarty.class.php, this piece
of code:
if(isset($auto_source))
{
// make source name safe for filename
$_filename = urlencode(basename($auto_source));
$_crc32 = sprintf('%08X', crc32($auto_source));
// prepend %% to avoid name conflicts with
// with $params['auto_id'] names
$_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep .
substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32;
$_return .= '%%' . $_crc32 . '%%' . $_filename;
}
somehow results in an invalid filename anyway. I'm investigating further..
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
iD8DBQFDCa4f95NUnGFZm9cRAgc9AKCwjIkNhR5HiYR6y/LRy78vIooi6QCeOqeo
OQIoZKSyM5KeyruZVJOmgxc=
=k4EE
-----END PGP SIGNATURE-----