protected function buildFilepath(Smarty_Template_Source
$source, Smarty_Internal_Template
$_template = null
) { $file =
$source->name;
if ($source instanceof Smarty_Config_Source
) { $_directories =
$source->smarty->
getConfigDir();
$_default_handler =
$source->smarty->default_config_handler_func;
} else { $_directories =
$source->smarty->
getTemplateDir();
$_default_handler =
$source->smarty->default_template_handler_func;
} // go relative to a given template?
$_file_is_dotted =
$file[0
] == '.'
&& ($file[1
] == '.' ||
$file[1
] == '/' ||
$file[1
] == '\\'
);
if ($_template &&
$_template->parent instanceof Smarty_Internal_Template &&
$_file_is_dotted) { if ($_template->parent->source->type != 'file' &&
$_template->parent->source->type != 'extends' && !
$_template->parent->allow_relative_path
) { throw new SmartyException("Template '{
$file}' cannot be relative to template of resource type '{
$_template->parent->source->type
}'"
);
}