Changeset 199488 for sideposts/trunk/framework/lib/filesystem.php
- Timestamp:
- 01/29/2010 02:34:53 PM (16 years ago)
- File:
-
- 1 edited
-
sideposts/trunk/framework/lib/filesystem.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sideposts/trunk/framework/lib/filesystem.php
r196960 r199488 126 126 function ak_dir_content($directory, $args='') 127 127 { 128 128 129 $directory = realpath($directory); // Be sure the directory path is well formed. 129 130 if ( ! is_dir($directory) ) { // Check if it is a directory. … … 164 165 } 165 166 $d->close(); 166 sort($dir_tree);167 asort($dir_tree); 167 168 168 169 return $dir_tree; 169 170 } 171 172 /** 173 * Returns a list of templates found in an array of directories 174 * 175 * @param array|string $folders Array of folders to search in. 176 * @return array Found templates (all found php files). 177 */ 178 function ak_get_templates( $folders ) 179 { 180 $paths = array(); 181 foreach ( (array) $folders as $folder ) { 182 $templates = ak_dir_content($folder, 'tree=0&extensions=php&with_ext=0'); 183 $paths = array_merge($templates, $paths); 184 } 185 186 return $paths; 187 }
Note: See TracChangeset
for help on using the changeset viewer.