removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpDocumentor / Smarty-2.6.0 / libs / core / core.is_trusted.php
diff --git a/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_trusted.php b/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.is_trusted.php
deleted file mode 100644 (file)
index 5b0bee5..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php\r
-/**\r
- * Smarty plugin\r
- * @package Smarty\r
- * @subpackage plugins\r
- */\r
-\r
-/**\r
- * @access private\r
- */\r
-/**\r
- * determines if a resource is trusted or not\r
- *\r
- * @param string $resource_type\r
- * @param string $resource_name\r
- * @return boolean\r
- */\r
-\r
- // $resource_type, $resource_name\r
-\r
-function smarty_core_is_trusted($params, &$smarty)\r
-{\r
-    $_smarty_trusted = false;\r
-    if ($params['resource_type'] == 'file') {\r
-        if (!empty($smarty->trusted_dir)) {\r
-            $_rp = realpath($params['resource_name']);\r
-            foreach ((array)$smarty->trusted_dir as $curr_dir) {\r
-                if (!empty($curr_dir) && is_readable ($curr_dir)) {\r
-                    $_cd = realpath($curr_dir);\r
-                    if (strncmp($_rp, $_cd, strlen($_cd)) == 0\r
-                        && $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) {\r
-                        $_smarty_trusted = true;\r
-                        break;\r
-                    }\r
-                }\r
-            }\r
-        }\r
-\r
-    } else {\r
-        // resource is not on local file system\r
-        $_smarty_trusted = call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][3],\r
-                                                array($params['resource_name'], $smarty));\r
-    }\r
-\r
-    return $_smarty_trusted;\r
-}\r
-\r
-/* vim: set expandtab: */\r
-\r
-?>\r