mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merged branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66112 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5df7237a93
commit
4e6036911e
@ -1499,6 +1499,9 @@ class SiteTree extends DataObject {
|
|||||||
$classes = ClassInfo::getValidSubClasses('SiteTree');
|
$classes = ClassInfo::getValidSubClasses('SiteTree');
|
||||||
array_shift($classes);
|
array_shift($classes);
|
||||||
|
|
||||||
|
$currentAddAction = null;
|
||||||
|
$currentClass = null;
|
||||||
|
|
||||||
foreach($classes as $class) {
|
foreach($classes as $class) {
|
||||||
$instance = singleton($class);
|
$instance = singleton($class);
|
||||||
if((($instance instanceof HiddenClass) || !$instance->canCreate()) && ($class != $this->class)) continue;
|
if((($instance instanceof HiddenClass) || !$instance->canCreate()) && ($class != $this->class)) continue;
|
||||||
@ -1518,8 +1521,6 @@ class SiteTree extends DataObject {
|
|||||||
$result[$class] = ($class == $this->class)
|
$result[$class] = ($class == $this->class)
|
||||||
? _t('SiteTree.CURRENTLY', 'Currently').' '.$addAction
|
? _t('SiteTree.CURRENTLY', 'Currently').' '.$addAction
|
||||||
: _t('SiteTree.CHANGETO', 'Change to').' '.$addAction;
|
: _t('SiteTree.CHANGETO', 'Change to').' '.$addAction;
|
||||||
$currentAddAction = null;
|
|
||||||
$currentClass = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user