removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpDocumentor / Smarty-2.6.0 / libs / core / core.assemble_plugin_filepath.php
diff --git a/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php b/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.assemble_plugin_filepath.php
deleted file mode 100644 (file)
index 4c40ae9..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php\r
-/**\r
- * Smarty plugin\r
- * @package Smarty\r
- * @subpackage plugins\r
- */\r
-\r
-/**\r
- * assemble filepath of requested plugin\r
- *\r
- * @param string $type\r
- * @param string $name\r
- * @return string|false\r
- */\r
-function smarty_core_assemble_plugin_filepath($params, &$smarty)\r
-{\r
-\r
-    $_plugin_filename = $params['type'] . '.' . $params['name'] . '.php';\r
-    $_return = false;\r
-\r
-    foreach ((array)$smarty->plugins_dir as $_plugin_dir) {\r
-\r
-        $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename;\r
-\r
-        // see if path is relative\r
-        if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) {\r
-            $_relative_paths[] = $_plugin_dir;\r
-            // relative path, see if it is in the SMARTY_DIR\r
-            if (@is_readable(SMARTY_DIR . $_plugin_filepath)) {\r
-                $_return = SMARTY_DIR . $_plugin_filepath;\r
-                break;\r
-            }\r
-        }\r
-        // try relative to cwd (or absolute)\r
-        if (@is_readable($_plugin_filepath)) {\r
-            $_return = $_plugin_filepath;\r
-            break;\r
-        }\r
-    }\r
-\r
-    if($_return === false) {\r
-        // still not found, try PHP include_path\r
-        if(isset($_relative_paths)) {\r
-            foreach ((array)$_relative_paths as $_plugin_dir) {\r
-\r
-                $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename;\r
-\r
-                $_params = array('file_path' => $_plugin_filepath);\r
-                require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php');\r
-                if(smarty_core_get_include_path($_params, $smarty)) {\r
-                    return $_params['new_file_path'];\r
-                }\r
-            }\r
-        }\r
-    }\r
-\r
-    return $_return;\r
-}\r
-\r
-/* vim: set expandtab: */\r
-\r
-?>\r