From 2b17b3a96693d74d81f212b330a5ea89c6db0c26 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 15 Dec 2004 21:19:42 +0000 Subject: - Patch #13907 by Neil: less ways to set the page title. * Less logic in theme code. * Encourages use of the menu system. * Easier to find where a title or breadcrumb comes from in other people's code because there are less places to look. Look in menu and then grep for the appropriate set function. Looking for calls to theme_page() is hard because there are too many of them. * Very slightly more efficient. --- modules/blog/blog.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/blog') diff --git a/modules/blog/blog.module b/modules/blog/blog.module index fceb01867..2a3388550 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -141,7 +141,7 @@ function blog_page_user($uid) { $account = user_load(array((is_numeric($uid) ? 'uid' : 'name') => $uid, 'status' => 1)); if ($account->uid) { - $title = t("%name's blog", array('%name' => $account->name)); + drupal_set_title($title = t("%name's blog", array('%name' => $account->name))); if (($account->uid == $user->uid) && user_access('edit own blog')) { $output = '
  • '. l(t('Post new blog entry.'), "node/add/blog") .'
  • '; @@ -165,7 +165,7 @@ function blog_page_user($uid) { $output .= theme('xml_icon', url("blog/feed/$account->uid")); drupal_set_html_head('uid") .'" />'); - print theme('page', $output, $title); + print theme('page', $output); } else { drupal_not_found(); -- cgit v1.2.3