Source for file core.is_secure.php
Documentation is available at core.is_secure.php
* determines if a resource is secure or not.
* @param string $resource_type
* @param string $resource_name
// $resource_type, $resource_name
static $check_template_dir = true;
if (!$smarty->security || $smarty->security_settings ['INCLUDE_ANY']) {
if ($params['resource_type'] == 'file') {
if($check_template_dir) {
if (!in_array($smarty->template_dir , $smarty->secure_dir ))
// add template_dir to secure_dir array
$check_template_dir = false;
if (!empty ($smarty->secure_dir )) {
$_rp = realpath($params['resource_name']);
foreach ((array) $smarty->secure_dir as $curr_dir) {
&& $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {
// resource is not on local file system
$smarty->_plugins ['resource'][$params['resource_type']][0 ][2 ],
array ($params['resource_name'], &$_smarty_secure, &$smarty));
/* vim: set expandtab: */
Documentation generated on Mon, 25 Jun 2007 14:02:06 -0400 by phpDocumentor 1.3.2. PEAR Logo Copyright © PHP Group 2004.
|