mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-01 04:41:37 +01:00
fix config_load, compile fetched arrays to compile_dir, switch display
back to runtime. clean up var names and function names, split up compile testing and compiling to separate funcs, rename some template_* functions to file_* functions and update logic so they can be used for file resources other than templates.
This commit is contained in:
@@ -37,12 +37,12 @@ function smarty_core_parse_file_path(&$params, &$this)
|
||||
$params['resource_name'] = $_file_path_parts[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($params['resource_type'] == 'file') {
|
||||
if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $params['resource_name'])) {
|
||||
// relative pathname to $params['file_base_path']
|
||||
// use the first directory where the file is found
|
||||
$_file_base_path = $params['file_base_path'];
|
||||
$_file_base_path = isset($params['file_base_path']) ? $params['file_base_path'] : array('.');
|
||||
settype($_file_base_path, 'array');
|
||||
foreach ($_file_base_path as $_curr_path) {
|
||||
$_fullpath = $_curr_path . DIRECTORY_SEPARATOR . $params['resource_name'];
|
||||
|
||||
Reference in New Issue
Block a user