mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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') {
|
||||
global $_TEMPLATE_MANIFEST;
|
||||
$path = current($_TEMPLATE_MANIFEST[substr($name,0,-3)]);
|
||||
ereg('.*/([^/]+)/templates/',$path,$module);
|
||||
ereg(Director::baseFolder() . '/([^/]+)/',$path,$module);
|
||||
} else {
|
||||
global $_CLASS_MANIFEST;
|
||||
$path = $_CLASS_MANIFEST[$name];
|
||||
ereg('.*/([^/]+)/code/',$path,$module);
|
||||
ereg(Director::baseFolder() . '/([^/]+)/',$path,$module);
|
||||
}
|
||||
return $module[1];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user