mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX Remove LeftAndMain entry from CMSMenu (#3014). Thanks to hamish for the patch!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65214 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
bcfa95887f
commit
59d9f2b3d8
@ -163,9 +163,9 @@ class CMSMenu extends Object implements Iterator
|
||||
}
|
||||
$subClasses = array_unique($subClasses);
|
||||
foreach($subClasses as $key => $className) {
|
||||
// Test that the class is not abstract and it has a valid menu title
|
||||
// Remove abstract classes and LeftAndMain
|
||||
$classReflection = new ReflectionClass($className);
|
||||
if(!$classReflection->isInstantiable()) {
|
||||
if(!$classReflection->isInstantiable() || 'LeftAndMain' == $className) {
|
||||
unset($subClasses[$key]);
|
||||
} else {
|
||||
if(singleton($className)->getMenuTitle() == '') {
|
||||
@ -199,4 +199,4 @@ class CMSMenu extends Object implements Iterator
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user