cvs: smarty /libs Smarty.class.php
| From: | Monte Ohrt | Date: | Tue, 17 Jun 2003 16:33:16 +0000 |
| Subject: | cvs: smarty /libs Smarty.class.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-655@lists.php.net to get a copy of this message | ||
mohrt Tue Jun 17 12:33:16 2003 EDT
Modified files:
/smarty/libs Smarty.class.php
Log:
fix _is_compiled logic
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.406 smarty/libs/Smarty.class.php:1.407
--- smarty/libs/Smarty.class.php:1.406 Tue Jun 17 11:23:25 2003
+++ smarty/libs/Smarty.class.php Tue Jun 17 12:33:16 2003
@@ -42,7 +42,7 @@
* @version 2.5.0
*/
-/* $Id: Smarty.class.php,v 1.406 2003/06/17 15:23:25 mohrt Exp $ */
+/* $Id: Smarty.class.php,v 1.407 2003/06/17 16:33:16 mohrt Exp $ */
/**
* DIR_SEP isn't used anymore, but third party apps might
@@ -1250,14 +1250,14 @@
// if we just need to display the results, don't perform output
// buffering - for speed
if ($display && !$this->caching &&
count($this->_plugins['outputfilter']) == 0) {
- if (!$this->_is_compiled($tpl_file, $_smarty_compile_path)
+ if ($this->_is_compiled($tpl_file, $_smarty_compile_path)
|| $this->_compile_template($tpl_file, $_smarty_compile_path))
{
include($_smarty_compile_path);
}
} else {
ob_start();
- if (!$this->_is_compiled($tpl_file, $_smarty_compile_path)
+ if ($this->_is_compiled($tpl_file, $_smarty_compile_path)
|| $this->_compile_template($tpl_file, $_smarty_compile_path))
{
include($_smarty_compile_path);
@@ -1414,27 +1414,27 @@
if (!$this->force_compile && file_exists($compile_path)) {
if (!$this->compile_check) {
// no need to check compiled file
- return false;
+ return true;
} else {
// get file source and timestamp
require_once(SMARTY_DIR . 'core/core.fetch_file_info.php');
$_params = array('file_path' => $file_path);
if (!smarty_core_fetch_file_info($_params, $this)) {
- return true;
+ return false;
}
$_file_source = $_params['file_source'];
$_file_timestamp = $_params['file_timestamp'];
if ($_file_timestamp <= filemtime($compile_path)) {
// template not expired, no recompile
- return false;
+ return true;
} else {
// compile template
- return true;
+ return false;
}
}
} else {
// compiled template does not exist, or forced compile
- return true;
+ return false;
}
}