Changeset 2588 for trunk/admin/include/functions.php
- Timestamp:
- Sep 25, 2008, 7:46:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r2575 r2588 1789 1789 } 1790 1790 1791 /** 1792 * returns a list of templates currently available in template-extension 1793 * Each .tpl file is extracted from template-extension. 1794 * @return array 1795 */ 1796 function get_extents($start='') 1797 { 1798 if ($start == '') { $start = './template-extension'; } 1799 $dir = opendir($start); 1800 $extents = array(); 1801 1802 while (($file = readdir($dir)) !== false) 1803 { 1804 if ( $file == '.' or $file == '..' or $file == '.svn') continue; 1805 $path = $start . '/' . $file; 1806 if (is_dir($path)) 1807 { 1808 $extents = array_merge($extents, get_extents($path)); 1809 } 1810 elseif ( !is_link($path) and file_exists($path) 1811 and get_extension($path) == 'tpl' ) 1812 { 1813 $extents[] = substr($path, 21); 1814 } 1815 } 1816 return $extents; 1817 } 1818 1791 1819 ?>
Note: See TracChangeset
for help on using the changeset viewer.