From af658ee605b83cfffba6405d78c1fc69abb92503 Mon Sep 17 00:00:00 2001 From: Ted Cooper Date: Sun, 16 Oct 2011 16:23:06 +1000 Subject: [PATCH] Issue #1041906 by ELC: Use drupal_set_title in taxonomy_term_page and fix simpletest. Combines patch from #18 with a fix to menu.text from #22. --- modules/simpletest/tests/menu.test | 3 +-- modules/taxonomy/taxonomy.pages.inc | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/simpletest/tests/menu.test b/modules/simpletest/tests/menu.test index 9929580..d0612ac 100644 --- a/modules/simpletest/tests/menu.test +++ b/modules/simpletest/tests/menu.test @@ -1345,8 +1345,7 @@ class MenuBreadcrumbTestCase extends MenuWebTestCase { $tree += array( $link['link_path'] => $link['link_title'], ); - // @todo Normally, you'd expect $term->name as page title here. - $this->assertBreadcrumb($link['link_path'], $trail, $link['link_title'], $tree); + $this->assertBreadcrumb($link['link_path'], $trail, $term->name, $tree); $this->assertRaw(check_plain($parent->title), 'Tagged node found.'); // Additionally make sure that this link appears only once; i.e., the diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc index 0cca252..2a8d961 100644 --- a/modules/taxonomy/taxonomy.pages.inc +++ b/modules/taxonomy/taxonomy.pages.inc @@ -14,6 +14,9 @@ * The page content. */ function taxonomy_term_page($term) { + // Assign the term name as the page title. + drupal_set_title($term->name); + // Build breadcrumb based on the hierarchy of the term. $current = (object) array( 'tid' => $term->tid, -- 1.7.2.5