mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fixed SiteTree::page_type_classes() removal of base class (was broken if database driver returned classes in arbitrary order, e.g. in Postgres) (from r102026)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112058 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0cc6d2b764
commit
ddf66c1fec
@ -295,7 +295,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
*/
|
||||
public static function page_type_classes() {
|
||||
$classes = ClassInfo::getValidSubClasses();
|
||||
array_shift($classes);
|
||||
if($baseClassIndex = array_search('SiteTree', $classes)) unset($classes[$baseClassIndex]);
|
||||
|
||||
$kill_ancestors = array();
|
||||
|
||||
// figure out if there are any classes we don't want to appear
|
||||
@ -318,7 +319,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
unset($classes[$idx]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user