diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-12-11 16:49:40 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-12-11 16:49:40 +0000 |
commit | ef2c240086e5014db6bdd37c43a75f045bcd5504 (patch) | |
tree | a5cfc85ab30d66cc5326085dcec570467be43c72 /modules/node | |
parent | 47182dfb1f65d2a107037a1386d85e6997afcd04 (diff) | |
download | brdo-ef2c240086e5014db6bdd37c43a75f045bcd5504.tar.gz brdo-ef2c240086e5014db6bdd37c43a75f045bcd5504.tar.bz2 |
- Patch #652834 by yched, effulgentsia: changed Field formatters as render arrays to increase performance (and to clean-up the code).
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.module | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 543c40f77..0f0d171cf 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -2203,7 +2203,11 @@ function node_page_default() { function node_page_view($node) { $return = node_show($node); if (isset($return['nodes'][$node->nid]['title'])) { - drupal_set_title($return['nodes'][$node->nid]['title']['items'][0]['#item']['value']); + // Get the language that was determined by language fallback logic during the + // field_attach_display() workflow. + // @todo That logic should be made available separately. + $langcode = $return['nodes'][$node->nid]['title']['#language']; + drupal_set_title($node->title[$langcode][0]['value']); } // Set the node path as the canonical URL to prevent duplicate content. drupal_add_html_head_link(array('rel' => 'canonical', 'href' => url('node/' . $node->nid)), TRUE); |