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:
Ingo Schommer 2008-11-04 13:56:40 +00:00
parent bcfa95887f
commit 59d9f2b3d8

View File

@ -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
}
}
?>
?>