summaryrefslogtreecommitdiff
path: root/modules/blog
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-12-15 21:19:42 +0000
committerDries Buytaert <dries@buytaert.net>2004-12-15 21:19:42 +0000
commit2b17b3a96693d74d81f212b330a5ea89c6db0c26 (patch)
tree46a3ef3aff0b2ff7c40e1b0afc617941be1a36d7 /modules/blog
parent5628256e6979335a58e7f9f873037873f24dae27 (diff)
downloadbrdo-2b17b3a96693d74d81f212b330a5ea89c6db0c26.tar.gz
brdo-2b17b3a96693d74d81f212b330a5ea89c6db0c26.tar.bz2
- 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.
Diffstat (limited to 'modules/blog')
-rw-r--r--modules/blog/blog.module4
1 files changed, 2 insertions, 2 deletions
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 = '<li>'. l(t('Post new blog entry.'), "node/add/blog") .'</li>';
@@ -165,7 +165,7 @@ function blog_page_user($uid) {
$output .= theme('xml_icon', url("blog/feed/$account->uid"));
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/feed/$account->uid") .'" />');
- print theme('page', $output, $title);
+ print theme('page', $output);
}
else {
drupal_not_found();