cvs: smarty /libs/core core.assemble_plugin_filepath.php core.read_cache_file.php core.write_file.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1082102525@cvsserver> |
messju Fri Apr 16 04:02:05 2004 EDT
Modified files:
/smarty/libs/core core.assemble_plugin_filepath.php
core.read_cache_file.php core.write_file.php
Log:
reverted stuff
http://cvs.php.net/diff.php/smarty/libs/core/core.assemble_plugin_filepath.php?r1=1.9&r2=1.10&ty=u
Index: smarty/libs/core/core.assemble_plugin_filepath.php
diff -u smarty/libs/core/core.assemble_plugin_filepath.php:1.9 smarty/libs/core/core.assemble_plugin_filepath.php:1.10
--- smarty/libs/core/core.assemble_plugin_filepath.php:1.9 Fri Apr 16 03:53:37 2004
+++ smarty/libs/core/core.assemble_plugin_filepath.php Fri Apr 16 04:02:04 2004
@@ -29,6 +29,11 @@
// see if path is relative
if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) {
$_relative_paths[] = $_plugin_dir;
+ // relative path, see if it is in the SMARTY_DIR
+ if (@is_readable(SMARTY_DIR . $_plugin_filepath)) {
+ $_return = SMARTY_DIR . $_plugin_filepath;
+ break;
+ }
}
// try relative to cwd (or absolute)
if (@is_readable($_plugin_filepath)) {
@@ -50,12 +55,6 @@
$_return = $_params['new_file_path'];
break;
}
- // maybe it is in the SMARTY_DIR
- if (@is_readable(SMARTY_DIR . $_plugin_filepath)) {
- $_return = SMARTY_DIR . $_plugin_filepath;
- break;
- }
-
}
}
}
http://cvs.php.net/diff.php/smarty/libs/core/core.read_cache_file.php?r1=1.15&r2=1.16&ty=u
Index: smarty/libs/core/core.read_cache_file.php
diff -u smarty/libs/core/core.read_cache_file.php:1.15 smarty/libs/core/core.read_cache_file.php:1.16
--- smarty/libs/core/core.read_cache_file.php:1.15 Fri Apr 16 03:53:37 2004
+++ smarty/libs/core/core.read_cache_file.php Fri Apr 16 04:02:04 2004
@@ -41,7 +41,6 @@
$_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']);
$_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id);
$params['results'] = $smarty->_read_file($_cache_file);
- # $params['results'] = file_get_contents($_cache_file);
}
if (empty($params['results'])) {
@@ -53,8 +52,6 @@
$cache_header = $cache_split[0];
$_cache_info = unserialize($cache_header);
- if (!isset($_cache_info['expires']))
- $_cache_info['expires'] = time() + $smarty->cache_lifetime;
if ($smarty->caching == 2 && isset ($_cache_info['expires'])){
// caching by expiration time
http://cvs.php.net/diff.php/smarty/libs/core/core.write_file.php?r1=1.9&r2=1.10&ty=u
Index: smarty/libs/core/core.write_file.php
diff -u smarty/libs/core/core.write_file.php:1.9 smarty/libs/core/core.write_file.php:1.10
--- smarty/libs/core/core.write_file.php:1.9 Fri Apr 16 03:53:37 2004
+++ smarty/libs/core/core.write_file.php Fri Apr 16 04:02:04 2004
@@ -25,9 +25,7 @@
// write to tmp file, then rename it to avoid
// file locking race condition
- # $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid('');
- $_tmp_file = tempnam($_dirname , '_tmp');
- # $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid('', true);
+ $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid('');
if (!($fd = @fopen($_tmp_file, 'w'))) {
$smarty->trigger_error("problem writing temporary file '$_tmp_file'");
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php