mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT More robust path-extraction of module-names
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43692 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
94c923459d
commit
a645869bc3
@ -923,11 +923,11 @@ class i18n extends Controller {
|
|||||||
if (substr($name,-3) == '.ss') {
|
if (substr($name,-3) == '.ss') {
|
||||||
global $_TEMPLATE_MANIFEST;
|
global $_TEMPLATE_MANIFEST;
|
||||||
$path = current($_TEMPLATE_MANIFEST[substr($name,0,-3)]);
|
$path = current($_TEMPLATE_MANIFEST[substr($name,0,-3)]);
|
||||||
ereg('.*/([^/]+)/templates/',$path,$module);
|
ereg(Director::baseFolder() . '/([^/]+)/',$path,$module);
|
||||||
} else {
|
} else {
|
||||||
global $_CLASS_MANIFEST;
|
global $_CLASS_MANIFEST;
|
||||||
$path = $_CLASS_MANIFEST[$name];
|
$path = $_CLASS_MANIFEST[$name];
|
||||||
ereg('.*/([^/]+)/code/',$path,$module);
|
ereg(Director::baseFolder() . '/([^/]+)/',$path,$module);
|
||||||
}
|
}
|
||||||
return $module[1];
|
return $module[1];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user