BUG: Page type names not translated in pages overview search form

Fixed by using the singularname translation for the class as values in the page
types array used for the page types dropdown field.
This commit is contained in:
Niklas Forsdahl 2012-09-04 08:55:38 +03:00
parent 4ad2b25679
commit 2934423ebc

View File

@ -247,8 +247,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
function SearchForm() {
// get all page types in a dropdown-compatible format
$pageTypes = SiteTree::page_type_classes();
$pageTypes = array_combine($pageTypes, $pageTypes);
$pageTypeClasses = SiteTree::page_type_classes();
$pageTypes = array();
foreach ($pageTypeClasses as $pageTypeClass) {
$pageTypes[$pageTypeClass] = _t($pageTypeClass.'.SINGULARNAME', $pageTypeClass);
}
asort($pageTypes);
// get all filter instances