mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-04 16:51:25 +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)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102026 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f89cb98d2a
commit
f6a8976121
@ -301,7 +301,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
*/
|
*/
|
||||||
public static function page_type_classes() {
|
public static function page_type_classes() {
|
||||||
$classes = ClassInfo::getValidSubClasses();
|
$classes = ClassInfo::getValidSubClasses();
|
||||||
array_shift($classes);
|
if($baseClassIndex = array_search('SiteTree', $classes)) unset($classes[$baseClassIndex]);
|
||||||
|
|
||||||
$kill_ancestors = array();
|
$kill_ancestors = array();
|
||||||
|
|
||||||
// figure out if there are any classes we don't want to appear
|
// figure out if there are any classes we don't want to appear
|
||||||
|
Loading…
Reference in New Issue
Block a user