Commit ab74ee2f authored by Jesse Norell's avatar Jesse Norell
Browse files

filenames via glob()

parent d5a0f240
...@@ -476,11 +476,9 @@ function checkAndRenameCustomTemplates($default_prompt='no') { ...@@ -476,11 +476,9 @@ function checkAndRenameCustomTemplates($default_prompt='no') {
$found_templates = array(); $found_templates = array();
foreach ($template_directories as $dir) { foreach ($template_directories as $dir) {
if (!is_dir($dir)) { continue; } if (!is_dir($dir)) { continue; }
$output = array(); foreach (glob("$dir/*.master") as $f) {
exec("find $dir -maxdepth 1 -name \*.master", $output); if (is_file($f)) {
foreach ($output as $f) { $found_templates[] = $f;
if (is_file(trim($f))) {
$found_templates[] = trim($f);
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment