MINOR Fixed i18n:;get_owner_module(), broken by changed manifest returns (paths with leading slash)

This commit is contained in:
Ingo Schommer 2012-04-27 10:11:06 +02:00
parent e7a4eec0da
commit 98c2517b80

View File

@ -1803,7 +1803,8 @@ class i18n extends Object implements TemplateGlobalProvider {
$path = Director::makeRelative($path);
$path = str_replace('\\', '/', $path);
return substr($path, 0, strpos($path, '/'));
$parts = explode('/', trim($path, '/'));
return array_shift($parts);
}
/**