fix problem with new default_resource_type changes

This commit is contained in:
mohrt
2003-06-06 20:30:53 +00:00
parent 891ddf1cfb
commit 245e5e5650

View File

@@ -30,16 +30,12 @@ function smarty_core_parse_file_path(&$params, &$this)
} else { } else {
if(strlen($_file_path_parts[0]) == 1) { if(strlen($_file_path_parts[0]) == 1) {
// 1 char is not resource type, but part of filepath // 1 char is not resource type, but part of filepath
$params['resource_type'] = $this->default_resource_type; $params['resource_type'] = 'file';
$params['resource_name'] = $params['file_path']; $params['resource_name'] = $params['file_path'];
} else { } else {
$params['resource_type'] = $_file_path_parts[0]; $params['resource_type'] = $_file_path_parts[0];
$params['resource_name'] = $_file_path_parts[1]; $params['resource_name'] = $_file_path_parts[1];
} }
if ($params['resource_type'] != 'file') {
$_params = array('type' => $params['resource_type']);
$this->_execute_core_function('load_resource_plugin', $_params);
}
} }
if ($params['resource_type'] == 'file') { if ($params['resource_type'] == 'file') {
@@ -63,9 +59,11 @@ function smarty_core_parse_file_path(&$params, &$this)
} }
return false; return false;
} }
} else {
$_params = array('type' => $params['resource_type']);
$this->_execute_core_function('load_resource_plugin', $_params);
} }
// resource type != file
return true; return true;
} }