summaryrefslogtreecommitdiff
path: root/modules/profile
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/profile
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/profile')
-rw-r--r--modules/profile/profile.module12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index df6e9fa2e..37bb21556 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -113,7 +113,8 @@ function profile_browse() {
}
$output .= '</div>';
- print theme('page', $output, $title);
+ drupal_set_title($title);
+ print theme('page', $output);
}
else if ($name && !$field->id) {
drupal_not_found();
@@ -136,7 +137,8 @@ function profile_browse() {
$output .= '</div>';
$output .= theme('pager', NULL, 20);
- print theme('page', $output, t('user list'));
+ drupal_set_title(t('user list'));
+ print theme('page', $output);
}
}
@@ -457,7 +459,8 @@ function profile_admin_add($type) {
$data = array('name' => 'profile_');
}
- print theme('page', _profile_field_form($type, $data), t('Add new %type', array('%type' => _profile_field_types($type))));
+ drupal_set_title(t('Add new %type', array('%type' => _profile_field_types($type))));
+ print theme('page', _profile_field_form($type, $data));
}
/**
@@ -484,7 +487,8 @@ function profile_admin_edit($fid) {
$data = db_fetch_array(db_query('SELECT * FROM {profile_fields} WHERE fid = %d', $fid));
}
- print theme('page', _profile_field_form($data['type'], $data), t('Edit %type', array('%type' => $data['type'])));
+ drupal_set_title(t('Edit %type', array('%type' => $data['type'])));
+ print theme('page', _profile_field_form($data['type'], $data));
}
/**