From b15fabaf0da1766d2a97f4b209404b7e181ecfc6 Mon Sep 17 00:00:00 2001 From: Kirk Mayo Date: Mon, 16 Jul 2012 14:56:24 +1200 Subject: [PATCH] BUG: open ticket 5880 always show the current page type in the page type dropdown list --- code/model/SiteTree.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php index b1190a5b0e..a05cbda3a5 100644 --- a/code/model/SiteTree.php +++ b/code/model/SiteTree.php @@ -2333,7 +2333,11 @@ protected function getClassDropdown() { $result = array(); foreach($classes as $class) { $instance = singleton($class); - if((($instance instanceof HiddenClass) || !$instance->canCreate())) continue; + + // if the current page type is this the same as the class type always show the page type in the list see open ticket 5880 for why + if ($this->ClassName != $instance->ClassName) { + if((($instance instanceof HiddenClass) || !$instance->canCreate())) continue; + } if($perms = $instance->stat('need_permission')) { if(!$this->can($perms)) continue;