Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 17db5baf1927ddb83d3b7bbea3a60831089c8def 1 parent 9b6ca79
@forsdahl forsdahl authored chillu committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 code/controllers/CMSMain.php
View
7 code/controllers/CMSMain.php
@@ -247,8 +247,11 @@ public function ExtraTreeTools() {
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
Please sign in to comment.
Something went wrong with that request. Please try again.