mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX ModelViewer doesn't work due to minor bug introduced by making $_CLASS_MANIFEST keys lowercase (fixes #6144, thanks daniel.lindkvist) (from r113249)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114524 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
662f581b24
commit
ecaa735db2
@ -129,7 +129,7 @@ class ModelViewer_Model extends ViewableData {
|
|||||||
|
|
||||||
function getModule() {
|
function getModule() {
|
||||||
global $_CLASS_MANIFEST;
|
global $_CLASS_MANIFEST;
|
||||||
$className = $this->className;
|
$className = strtolower($this->className);
|
||||||
if(($pos = strpos($className,'_')) !== false) $className = substr($className,0,$pos);
|
if(($pos = strpos($className,'_')) !== false) $className = substr($className,0,$pos);
|
||||||
if(isset($_CLASS_MANIFEST[$className])) {
|
if(isset($_CLASS_MANIFEST[$className])) {
|
||||||
if(preg_match('/^'.str_replace('/','\/',preg_quote(BASE_PATH)).'\/([^\/]+)\//', $_CLASS_MANIFEST[$className], $matches)) {
|
if(preg_match('/^'.str_replace('/','\/',preg_quote(BASE_PATH)).'\/([^\/]+)\//', $_CLASS_MANIFEST[$className], $matches)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user