diff --git a/libs/core/core.create_dir_structure.php b/libs/core/core.create_dir_structure.php index 8d4f2e97..e74af32a 100644 --- a/libs/core/core.create_dir_structure.php +++ b/libs/core/core.create_dir_structure.php @@ -38,12 +38,12 @@ function smarty_core_create_dir_structure($params, &$this) if (isset($_root_dir[3])) array_shift($_dir_parts); } else { - $_new_dir = str_replace('\\','/', getcwd()).'/'; + $_new_dir = str_replace('\\', '/', getcwd()).'/'; } if($_use_open_basedir = !empty($_open_basedir_ini)) { - $_open_basedirs = explode(';', str_replace('\\','/', $_open_basedir_ini)); + $_open_basedirs = explode(';', str_replace('\\', '/', $_open_basedir_ini)); } } @@ -56,7 +56,7 @@ function smarty_core_create_dir_structure($params, &$this) // do not attempt to test or make directories outside of open_basedir $_make_new_dir = false; foreach ($_open_basedirs as $_open_basedir) { - if (substr($_new_dir.'/', 0, strlen($_open_basedir)) == $_open_basedir) { + if (substr($_new_dir . '/', 0, strlen($_open_basedir)) == $_open_basedir) { $_make_new_dir = true; break; } diff --git a/libs/core/core.write_file.php b/libs/core/core.write_file.php index c300d495..83e0e8d4 100644 --- a/libs/core/core.write_file.php +++ b/libs/core/core.write_file.php @@ -25,7 +25,7 @@ function smarty_core_write_file($params, &$this) // write to tmp file, then rename it to avoid // file locking race condition - $_tmp_file = $_dirname . '/' . uniqid(''); + $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid(''); if (!($fd = @fopen($_tmp_file, 'w'))) { $this->trigger_error("problem writing temporary file '$_tmp_file'"); diff --git a/libs/plugins/function.config_load.php b/libs/plugins/function.config_load.php index fcfa0ddd..6c4608b5 100644 --- a/libs/plugins/function.config_load.php +++ b/libs/plugins/function.config_load.php @@ -63,7 +63,7 @@ function smarty_function_config_load($params, &$smarty) $_config_dir = $_params['new_file_path']; } - $_file_path = $_config_dir . '/' . $_file; + $_file_path = $_config_dir . DIRECTORY_SEPARATOR . $_file; $_compile_file = $smarty->_get_compile_path($_file_path); if($smarty->force_compile