mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
clean up comments, formatting
This commit is contained in:
@@ -45,18 +45,18 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set SMARTY_DIR to absolute path to Smarty library files.
|
* DIR_SEP isn't used anymore, but third party apps might
|
||||||
* if not defined, include_path will be used. Sets SMARTY_DIR only if user
|
|
||||||
* application has not already defined it.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(!defined('DIR_SEP')) {
|
if(!defined('DIR_SEP')) {
|
||||||
define('DIR_SEP', DIRECTORY_SEPARATOR);
|
define('DIR_SEP', DIRECTORY_SEPARATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets SMARTY_DIR only if user application has not already defined it
|
* set SMARTY_DIR to absolute path to Smarty library files.
|
||||||
|
* if not defined, include_path will be used. Sets SMARTY_DIR only if user
|
||||||
|
* application has not already defined it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('SMARTY_DIR')) {
|
if (!defined('SMARTY_DIR')) {
|
||||||
define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
|
define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
|
||||||
}
|
}
|
||||||
@@ -2196,7 +2196,7 @@ class Smarty
|
|||||||
function _create_dir_structure($dir)
|
function _create_dir_structure($dir)
|
||||||
{
|
{
|
||||||
if (!file_exists($dir)) {
|
if (!file_exists($dir)) {
|
||||||
$_dir_parts = preg_split('!\\'.DIRECTORY_SEPARATOR.'+!', $dir, -1, PREG_SPLIT_NO_EMPTY);
|
$_dir_parts = preg_split('!\\' . DIRECTORY_SEPARATOR . '+!', $dir, -1, PREG_SPLIT_NO_EMPTY);
|
||||||
$_new_dir = ($dir{0} == DIRECTORY_SEPARATOR) ? DIRECTORY_SEPARATOR : '';
|
$_new_dir = ($dir{0} == DIRECTORY_SEPARATOR) ? DIRECTORY_SEPARATOR : '';
|
||||||
|
|
||||||
// do not attempt to test or make directories outside of open_basedir
|
// do not attempt to test or make directories outside of open_basedir
|
||||||
@@ -2341,7 +2341,7 @@ class Smarty
|
|||||||
|
|
||||||
if (isset($this->_cache_info['config'])) {
|
if (isset($this->_cache_info['config'])) {
|
||||||
foreach ($this->_cache_info['config'] as $config_dep) {
|
foreach ($this->_cache_info['config'] as $config_dep) {
|
||||||
if ($this->_cache_info['timestamp'] < filemtime($this->config_dir.DIRECTORY_SEPARATOR.$config_dep)) {
|
if ($this->_cache_info['timestamp'] < filemtime($this->config_dir . DIRECTORY_SEPARATOR . $config_dep)) {
|
||||||
// config file has changed, regenerate cache
|
// config file has changed, regenerate cache
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user