removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpDocumentor / Smarty-2.6.0 / libs / core / core.create_dir_structure.php
diff --git a/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.create_dir_structure.php b/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/core/core.create_dir_structure.php
deleted file mode 100644 (file)
index b57d50e..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php\r
-/**\r
- * Smarty plugin\r
- * @package Smarty\r
- * @subpackage plugins\r
- */\r
-\r
-/**\r
- * create full directory structure\r
- *\r
- * @param string $dir\r
- */\r
-\r
-// $dir\r
-\r
-function smarty_core_create_dir_structure($params, &$smarty)\r
-{\r
-    if (!file_exists($params['dir'])) {\r
-        $_open_basedir_ini = ini_get('open_basedir');\r
-\r
-        if (DIRECTORY_SEPARATOR=='/') {\r
-            /* unix-style paths */\r
-            $_dir = $params['dir'];\r
-            $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);\r
-            $_new_dir = ($_dir{0}=='/') ? '/' : getcwd().'/';\r
-            if($_use_open_basedir = !empty($_open_basedir_ini)) {\r
-                $_open_basedirs = explode(':', $_open_basedir_ini);\r
-            }\r
-\r
-        } else {\r
-            /* other-style paths */\r
-            $_dir = str_replace('\\','/', $params['dir']);\r
-            $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);\r
-            if (preg_match('!^((//)|([a-zA-Z]:/))!', $_dir, $_root_dir)) {\r
-                /* leading "//" for network volume, or "[letter]:/" for full path */\r
-                $_new_dir = $_root_dir[1];\r
-                /* remove drive-letter from _dir_parts */\r
-                if (isset($_root_dir[3])) array_shift($_dir_parts);\r
-\r
-            } else {\r
-                $_new_dir = str_replace('\\', '/', getcwd()).'/';\r
-\r
-            }\r
-\r
-            if($_use_open_basedir = !empty($_open_basedir_ini)) {\r
-                $_open_basedirs = explode(';', str_replace('\\', '/', $_open_basedir_ini));\r
-            }\r
-\r
-        }\r
-\r
-        /* all paths use "/" only from here */\r
-        foreach ($_dir_parts as $_dir_part) {\r
-            $_new_dir .= $_dir_part;\r
-\r
-            if ($_use_open_basedir) {\r
-                // do not attempt to test or make directories outside of open_basedir\r
-                $_make_new_dir = false;\r
-                foreach ($_open_basedirs as $_open_basedir) {\r
-                    if (substr($_new_dir, 0, strlen($_open_basedir)) == $_open_basedir) {\r
-                        $_make_new_dir = true;\r
-                        break;\r
-                    }\r
-                }\r
-            } else {\r
-                $_make_new_dir = true;\r
-            }\r
-\r
-            if ($_make_new_dir && !file_exists($_new_dir) && !@mkdir($_new_dir, $smarty->_dir_perms) && !is_dir($_new_dir)) {\r
-                $smarty->trigger_error("problem creating directory '" . $_new_dir . "'");\r
-                return false;\r
-            }\r
-            $_new_dir .= '/';\r
-        }\r
-    }\r
-}\r
-\r
-/* vim: set expandtab: */\r
-\r
-?>\r