BUGFIX Fixed PHP variable initialization in SiteTree->getClassDropdown() which broke class dropdown in behaviour tab (regression from r66092)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66107 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-11-18 01:39:45 +00:00 committed by Sam Minnee
parent a14afe10d4
commit db0815c115

View File

@ -1498,6 +1498,9 @@ class SiteTree extends DataObject {
protected function getClassDropdown() {
$classes = ClassInfo::getValidSubClasses('SiteTree');
array_shift($classes);
$currentAddAction = null;
$currentClass = null;
foreach($classes as $class) {
$instance = singleton($class);
@ -1518,8 +1521,6 @@ class SiteTree extends DataObject {
$result[$class] = ($class == $this->class)
? _t('SiteTree.CURRENTLY', 'Currently').' '.$addAction
: _t('SiteTree.CHANGETO', 'Change to').' '.$addAction;
$currentAddAction = null;
$currentClass = null;
}
}