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/user.module | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/user.module') diff --git a/modules/user.module b/modules/user.module index a07fa5fef..e60a6bda2 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1169,7 +1169,8 @@ function user_edit($category = 'account') { } $output = form($output, 'post', 0, array('enctype' => 'multipart/form-data')); - print theme('page', $output, $account->name); + drupal_set_title($account->name); + print theme('page', $output); } function user_view($uid = 0) { @@ -1186,7 +1187,8 @@ function user_view($uid = 0) { } } - print theme('page', theme('user_profile', $account, $fields), $account->name); + drupal_set_title($account->name); + print theme('page', theme('user_profile', $account, $fields)); } else { drupal_not_found(); -- cgit v1.2.3