Skip to content

Commit ab74ee2

Browse files
committed
filenames via glob()
1 parent d5a0f24 commit ab74ee2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

install/lib/update.lib.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -476,11 +476,9 @@ function checkAndRenameCustomTemplates($default_prompt='no') {
476476
$found_templates = array();
477477
foreach ($template_directories as $dir) {
478478
if (!is_dir($dir)) { continue; }
479-
$output = array();
480-
exec("find $dir -maxdepth 1 -name \*.master", $output);
481-
foreach ($output as $f) {
482-
if (is_file(trim($f))) {
483-
$found_templates[] = trim($f);
479+
foreach (glob("$dir/*.master") as $f) {
480+
if (is_file($f)) {
481+
$found_templates[] = $f;
484482
}
485483
}
486484
}

0 commit comments

Comments
 (0)