1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-04 21:27:41 +02:00

Merge pull request #252 from vvpd/develop

When scanning for themes make sure to only consider visible folders
This commit is contained in:
trendschau
2021-03-30 19:54:40 +02:00
committed by GitHub

View File

@@ -33,7 +33,9 @@ class Settings
if(!isset($settings['theme']) OR !file_exists($themefolder . $settings['theme']))
{
# scan theme folder and get the first theme
$themes = array_diff(scandir($themefolder), array('..', '.'));
$themes = array_filter(scandir($themefolder), function ($item) use($themefolder) {
return is_dir($themefolder . $item) && strpos($item, '.') !== 0;
});
$firsttheme = reset($themes);
# if there is a theme with an index.twig-file