Source for file core.is_trusted.php
Documentation is available at core.is_trusted.php
* determines if a resource is trusted or not
* @param string $resource_type
* @param string $resource_name
// $resource_type, $resource_name
function smarty_core_is_trusted($params, &$smarty)
$_smarty_trusted = false;
if ($params['resource_type'] == 'file') {
if (!empty($smarty->trusted_dir)) {
$_rp = realpath($params['resource_name']);
foreach ((array) $smarty->trusted_dir as $curr_dir) {
&& $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {
// resource is not on local file system
$_smarty_trusted = call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][3],
array($params['resource_name'], $smarty));
/* vim: set expandtab: */
|