mirror of
https://github.com/typemill/typemill.git
synced 2025-07-30 19:00:32 +02:00
When scanning for themes make sure to only consider visible folders
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user