Skip to content
Snippets Groups Projects
Commit ab74ee2f authored by Jesse Norell's avatar Jesse Norell
Browse files

filenames via glob()

parent d5a0f240
No related branches found
No related tags found
1 merge request!1286check for conf-custom templates during update
...@@ -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);
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment