Merge pull request #433 from Sommerregen/patch-3

Fixes #432 (Theme autoloading doesn't seem to work)
This commit is contained in:
Flavio Copes
2015-11-10 14:32:14 +01:00

View File

@@ -284,11 +284,11 @@ class Themes extends Iterator
$class = substr($class, strlen($prefix));
// Replace namespace tokens to directory separators
$path = ltrim(preg_replace('#\\\|_(?!.+\\\)#', '/', $class), '/');
$path = strtolower(ltrim(preg_replace('#\\\|_(?!.+\\\)#', '/', $class), '/'));
$file = $locator->findResource("themes://{$path}/{$path}.php");
// Load class
if (stream_resolve_include_path($file)) {
if (file_exists($file)) {
return include_once($file);
}
}