diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-03-21 14:28:15 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-03-21 14:28:15 +0000 |
commit | 754f2ac26a2dbe81fcaa2886d4a8f5030b8e6cda (patch) | |
tree | c0300113f97cbc055fe177e75542e11c0c0ff400 /modules/profile/profile.module | |
parent | f43cd3bb3399bf13109945b5d259e5fe934a81f7 (diff) | |
download | brdo-754f2ac26a2dbe81fcaa2886d4a8f5030b8e6cda.tar.gz brdo-754f2ac26a2dbe81fcaa2886d4a8f5030b8e6cda.tar.bz2 |
- More profile module improvements:
+ Updated the _user() hook's "$type == 'view'" case to match the
"$type == 'edit'" case. That is, both have to return an associtive
array of the format array('category' => 'fields').
+ Updated the profile pages to group fields by category. Made possible
thanks to the above change.
+ Moved logic out of the theme_ functions.
Diffstat (limited to 'modules/profile/profile.module')
-rw-r--r-- | modules/profile/profile.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 4efc5b656..7dae35895 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -129,15 +129,15 @@ function profile_view_profile($user) { while ($field = db_fetch_object($result)) { if ($value = profile_view_field($user, $field)) { if ($field->type == 'checkbox') { - $output .= "<p>$value</p>"; + $fields[$field->category] .= "<p>$value</p>"; } else { - $output .= form_item($field->title, check_output($value)); + $fields[$field->category] .= form_item($field->title, check_output($value)); } } } - return $output; + return $fields; } function profile_edit_profile($edit, $user) { |