Commit b4afc891 authored by Andrew Robert Nicols's avatar Andrew Robert Nicols

Ignore hidden theme directories (bug #868851)

Change-Id: I2aaf8068fac96725caee93e01b787f13ff8585eb
Signed-off-by: default avatarAndrew Robert Nicols <andrew.nicols@luns.net.uk>
parent 30de6abc
......@@ -712,7 +712,7 @@ function get_all_theme_objects() {
throw new SystemException('Unable to read theme directory '.$themebase);
}
while (false !== ($subdir = readdir($themedir))) {
if ($subdir != "." && $subdir != ".." && is_dir($themebase . $subdir)) {
if (substr($subdir, 0, 1) != "." && is_dir($themebase . $subdir)) {
// is the theme directory name valid?
if (!Theme::name_is_valid($subdir)) {
log_warn(get_string('themenameinvalid', 'error', $subdir));
......
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