- Timestamp:
- Mar 15, 2013, 11:06:38 AM (12 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/extend_for_templates.php
r19703 r21567 114 114 $flip_templates = array_flip($eligible_templates); 115 115 116 /**117 * returns an array contening sub-directories, excluding ".svn"118 *119 * @param string $dir120 * @return array121 */122 function get_dirs($directory)123 {124 $sub_dirs = array();125 if ($opendir = opendir($directory))126 {127 while ($file = readdir($opendir))128 {129 if ($file != '.'130 and $file != '..'131 and is_dir($directory.'/'.$file)132 and $file != '.svn')133 {134 array_push($sub_dirs, $file);135 }136 }137 closedir($opendir);138 }139 return $sub_dirs;140 }141 142 116 $available_templates = array_merge( 143 117 array('N/A' => '----------'), -
trunk/admin/include/functions.php
r21070 r21567 2457 2457 } 2458 2458 } 2459 2460 /** 2461 * returns an array contening sub-directories, excluding ".svn" 2462 * 2463 * @param string $dir 2464 * @return array 2465 */ 2466 function get_dirs($directory) 2467 { 2468 $sub_dirs = array(); 2469 if ($opendir = opendir($directory)) 2470 { 2471 while ($file = readdir($opendir)) 2472 { 2473 if ($file != '.' 2474 and $file != '..' 2475 and is_dir($directory.'/'.$file) 2476 and $file != '.svn') 2477 { 2478 array_push($sub_dirs, $file); 2479 } 2480 } 2481 closedir($opendir); 2482 } 2483 return $sub_dirs; 2484 } 2459 2485 ?>
Note: See TracChangeset
for help on using the changeset viewer.