summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-04 19:52:33 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-04 19:52:33 +0000
commitfe58724f25c8c94087f4c541d8e306e6fae25d02 (patch)
tree91013915c56cbf909956b6efbb101c3726c45394
parent0bda8f47009c8d48f2b72bbece91bb4f9dbdd31a (diff)
downloadbrdo-fe58724f25c8c94087f4c541d8e306e6fae25d02.tar.gz
brdo-fe58724f25c8c94087f4c541d8e306e6fae25d02.tar.bz2
- Small bugfix + small improvement.
-rw-r--r--modules/profile.module4
-rw-r--r--modules/profile/profile.module4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/profile.module b/modules/profile.module
index 37bb21556..94e28f130 100644
--- a/modules/profile.module
+++ b/modules/profile.module
@@ -75,7 +75,7 @@ function profile_browse() {
// Compile a list of fields to show
$fields = array();
- $result = db_query('SELECT name, title, type FROM {profile_fields} WHERE fid != %d AND visibility = %d', $field->fid, PROFILE_PUBLIC_LISTINGS);
+ $result = db_query('SELECT name, title, type FROM {profile_fields} WHERE fid != %d AND visibility = %d ORDER BY weight', $field->fid, PROFILE_PUBLIC_LISTINGS);
while ($record = db_fetch_object($result)) {
$fields[] = $record;
}
@@ -183,7 +183,7 @@ function profile_view_field($user, $field) {
case 'selection':
return $browse ? l(drupal_specialchars($value), "profile/$field->name/". check_url($value)) : drupal_specialchars($value);
case 'checkbox':
- return $browse ? l(drupal_specialchars($field->title), "profile/$field->name") : drupal_specialchars($field->title);
+ return $browse ? l(strip_tags($field->title), "profile/$field->name") : drupal_specialchars($field->title);
case 'url':
return '<a href="'. check_url($value) .'">'. drupal_specialchars($value) .'</a>';
case 'date':
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 37bb21556..94e28f130 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -75,7 +75,7 @@ function profile_browse() {
// Compile a list of fields to show
$fields = array();
- $result = db_query('SELECT name, title, type FROM {profile_fields} WHERE fid != %d AND visibility = %d', $field->fid, PROFILE_PUBLIC_LISTINGS);
+ $result = db_query('SELECT name, title, type FROM {profile_fields} WHERE fid != %d AND visibility = %d ORDER BY weight', $field->fid, PROFILE_PUBLIC_LISTINGS);
while ($record = db_fetch_object($result)) {
$fields[] = $record;
}
@@ -183,7 +183,7 @@ function profile_view_field($user, $field) {
case 'selection':
return $browse ? l(drupal_specialchars($value), "profile/$field->name/". check_url($value)) : drupal_specialchars($value);
case 'checkbox':
- return $browse ? l(drupal_specialchars($field->title), "profile/$field->name") : drupal_specialchars($field->title);
+ return $browse ? l(strip_tags($field->title), "profile/$field->name") : drupal_specialchars($field->title);
case 'url':
return '<a href="'. check_url($value) .'">'. drupal_specialchars($value) .'</a>';
case 'date':