BUGFIX "Page type" dropdown for site tree filters is now sorted alphabetically, to be consistent with the "Create" page type dropdown list

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@81462 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-07-09 05:41:30 +00:00
parent 0690d9f4a4
commit ed70de49b8

View File

@ -208,7 +208,9 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
}
public function SiteTreeFilterPageTypeField() {
$types = SiteTree::page_type_classes(); array_unshift($types, 'All');
$optionsetField = new DropdownField('ClassName', 'ClassName', array_combine($types, $types), 'Any');
$source = array_combine($types, $types);
asort($source);
$optionsetField = new DropdownField('ClassName', 'ClassName', $source, 'Any');
return $optionsetField->Field();
}