Changeset 2588 for trunk/admin/extend_for_templates.php
- Timestamp:
- Sep 25, 2008, 7:46:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/extend_for_templates.php
r2549 r2588 36 36 */ 37 37 38 // +-----------------------------------------------------------------------+39 // | functions |40 // +-----------------------------------------------------------------------+41 42 /**43 * returns a list of templates currently available in template-extension44 *45 * Each .tpl file is extracted from template-extension.46 *47 * @return array48 */49 function get_extents($start='')50 {51 if ($start == '') { $start = './template-extension'; }52 $dir = opendir($start);53 $extents = array();54 55 while (($file = readdir($dir)) !== false)56 {57 if ( $file == '.' or $file == '..' or $file == '.svn') continue;58 $path = $start . '/' . $file;59 if (is_dir($path))60 {61 $extents = array_merge($extents, get_extents($path));62 }63 elseif ( !is_link($path) and file_exists($path)64 and strripos($path,'.tpl') > 0 )65 {66 $extents[] = substr($path, 21);67 }68 }69 return $extents;70 }71 38 // +-----------------------------------------------------------------------+ 72 39 // initialization |
Note: See TracChangeset
for help on using the changeset viewer.