From db0815c115bcffd0e8177b4cf7e6c42b38abd639 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 18 Nov 2008 01:39:45 +0000 Subject: [PATCH] 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 --- core/model/SiteTree.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index b8872529d..cdda24cfc 100644 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -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; } }