mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
enhanced auto-generated filenames for templates_c and cache
incremented Smarty::_version because the tempfiles' structure changed a little
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
|||||||
|
- enhanced auto-generated filenames for templates_c and cache (messju)
|
||||||
- add 'nonstd' to escape modifier for escaping non-std chars,
|
- add 'nonstd' to escape modifier for escaping non-std chars,
|
||||||
such as ms doc quote (Monte)
|
such as ms doc quote (Monte)
|
||||||
- adjusted textformat to not output wrap chars after last para
|
- adjusted textformat to not output wrap chars after last para
|
||||||
|
@@ -459,7 +459,7 @@ class Smarty
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
var $_version = '2.6.3-dev';
|
var $_version = '2.6.3-dev-2';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* current template inclusion depth
|
* current template inclusion depth
|
||||||
@@ -1747,11 +1747,12 @@ class Smarty
|
|||||||
if(isset($auto_source)) {
|
if(isset($auto_source)) {
|
||||||
// make source name safe for filename
|
// make source name safe for filename
|
||||||
$_filename = urlencode(basename($auto_source));
|
$_filename = urlencode(basename($auto_source));
|
||||||
$_crc32 = crc32($auto_source) . $_compile_dir_sep;
|
$_crc32 = sprintf("%08X", crc32($auto_source));
|
||||||
// prepend %% to avoid name conflicts with
|
// prepend %% to avoid name conflicts with
|
||||||
// with $params['auto_id'] names
|
// with $params['auto_id'] names
|
||||||
$_crc32 = '%%' . substr($_crc32,0,3) . $_compile_dir_sep . '%%' . $_crc32;
|
$_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep .
|
||||||
$_return .= $_crc32 . $_filename;
|
substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32;
|
||||||
|
$_return .= '%%' . $_crc32 . '%%' . $_filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $_return;
|
return $_return;
|
||||||
|
Reference in New Issue
Block a user