init
[garradin.git] / include / libs / template_lite / internal / template.build_dir.php
1 <?php
2 /**
3 * Template Lite template_build_dir template internal module
4 *
5 * Type: template
6 * Name: template_build_dir
7 */
8
9 function template_build_dir($dir, $id, &$object)
10 {
11 $_args = explode('|', $id);
12 if (count($_args) == 1 && empty($_args[0]))
13 {
14 return $object->_get_dir($dir);
15 }
16 $_result = $object->_get_dir($dir);
17 foreach($_args as $value)
18 {
19 $_result .= $value;
20 if (!is_dir($_result))
21 {
22 mkdir($_result, 0777);
23 }
24 $_result.= DIRECTORY_SEPARATOR;
25 }
26 return $_result;
27 }
28
29 ?>