cvs: smarty / Smarty.class.php
| From: | Monte Ohrt | Date: | Mon, 17 Jun 2002 14:39:01 +0000 |
| Subject: | cvs: smarty / Smarty.class.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-139@lists.php.net to get a copy of this message | ||
mohrt Mon Jun 17 10:39:01 2002 EDT
Modified files:
/smarty Smarty.class.php
Log:
swapped around cache_id and compile_id order
Index: smarty/Smarty.class.php
diff -u smarty/Smarty.class.php:1.283 smarty/Smarty.class.php:1.284
--- smarty/Smarty.class.php:1.283 Fri Jun 14 16:58:19 2002
+++ smarty/Smarty.class.php Mon Jun 17 10:39:01 2002
@@ -455,9 +455,11 @@
if (!isset($compile_id))
$compile_id = $this->compile_id;
- if (isset($compile_id) || isset($cache_id))
- $auto_id = (isset($compile_id)) ? $compile_id . '|' . $cache_id : $cache_id;
- else
+ if (isset($cache_id))
+ $auto_id = (isset($compile_id)) ? $cache_id . '|' . $compile_id : $cache_id;
+ elseif(isset($compile_id))
+ $auto_id = $compile_id;
+ else
$auto_id = null;
if (!empty($this->cache_handler_func)) {
@@ -1546,9 +1548,11 @@
return $funcname('write', $this, $results, $tpl_file, $cache_id,
$compile_id);
} else {
// use local cache file
- if (isset($compile_id) || isset($cache_id))
- $auto_id = (isset($compile_id)) ? $compile_id . '|' . $cache_id : $cache_id;
- else
+ if (isset($cache_id))
+ $auto_id = (isset($compile_id)) ? $cache_id . '|' . $compile_id : $cache_id;
+ elseif(isset($compile_id))
+ $auto_id = $compile_id;
+ else
$auto_id = null;
$cache_file = $this->_get_auto_filename($this->cache_dir, $tpl_file, $auto_id);
@@ -1581,10 +1585,12 @@
$funcname = $this->cache_handler_func;
$funcname('read', $this, $results, $tpl_file, $cache_id, $compile_id);
} else {
- // use local file cache
- if (isset($compile_id) || isset($cache_id))
- $auto_id = (isset($compile_id)) ? $compile_id . '|' . $cache_id : $cache_id;
- else
+ // use local cache file
+ if (isset($cache_id))
+ $auto_id = (isset($compile_id)) ? $cache_id . '|' . $compile_id : $cache_id;
+ elseif(isset($compile_id))
+ $auto_id = $compile_id;
+ else
$auto_id = null;
$cache_file = $this->_get_auto_filename($this->cache_dir, $tpl_file, $auto_id);