diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-18 00:04:24 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-18 00:04:24 +0000 |
commit | e18feedfdb429e35173b85fc7182aadabee0a166 (patch) | |
tree | 20c8e64d4db97378fad2bc27689b9b88e9390f1f /modules/profile | |
parent | 6a1217aff08d3380658ef47e0e9d9d693683c66a (diff) | |
download | brdo-e18feedfdb429e35173b85fc7182aadabee0a166.tar.gz brdo-e18feedfdb429e35173b85fc7182aadabee0a166.tar.bz2 |
#564394 by Berdir and Crell: Removed database BC layer. nah nah nah nah... hey hey hey... gooood byeeee...
Diffstat (limited to 'modules/profile')
-rw-r--r-- | modules/profile/profile.admin.inc | 2 | ||||
-rw-r--r-- | modules/profile/profile.module | 4 | ||||
-rw-r--r-- | modules/profile/profile.pages.inc | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc index f1bf2855c..df07bdeec 100644 --- a/modules/profile/profile.admin.inc +++ b/modules/profile/profile.admin.inc @@ -420,7 +420,7 @@ function profile_field_delete_submit($form, &$form_state) { */ function profile_admin_settings_autocomplete($string) { $matches = array(); - $result = db_query_range("SELECT category FROM {profile_field} WHERE LOWER(category) LIKE LOWER(:category)", array(':category' => $string . '%'), 0, 10); + $result = db_query_range("SELECT category FROM {profile_field} WHERE LOWER(category) LIKE LOWER(:category)", 0, 10, array(':category' => $string . '%')); foreach ($result as $data) { $matches[$data->category] = check_plain($data->category); } diff --git a/modules/profile/profile.module b/modules/profile/profile.module index efe8830fe..ac6cd9118 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -510,10 +510,10 @@ function profile_category_access($account, $category) { return TRUE; } else { - $category_visible = (bool) db_query_range('SELECT 1 FROM {profile_field} WHERE category = :category AND visibility <> :visibility', array( + $category_visible = (bool) db_query_range('SELECT 1 FROM {profile_field} WHERE category = :category AND visibility <> :visibility', 0, 1, array( ':category' => $category, ':visibility' => PROFILE_HIDDEN - ), 0, 1)->fetchField(); + ))->fetchField(); return user_edit_access($account) && $category_visible; } } diff --git a/modules/profile/profile.pages.inc b/modules/profile/profile.pages.inc index 8f69d888b..b338e8604 100644 --- a/modules/profile/profile.pages.inc +++ b/modules/profile/profile.pages.inc @@ -123,12 +123,12 @@ function profile_browse() { */ function profile_autocomplete($field, $string) { $matches = array(); - $autocomplete_field = (bool) db_query_range("SELECT 1 FROM {profile_field} WHERE fid = :fid AND autocomplete = 1", array(':fid' => $field), 0, 1)->fetchField(); + $autocomplete_field = (bool) db_query_range("SELECT 1 FROM {profile_field} WHERE fid = :fid AND autocomplete = 1", 0, 1, array(':fid' => $field))->fetchField(); if ($autocomplete_field) { - $values = db_query_range("SELECT value FROM {profile_value} WHERE fid = :fid AND LOWER(value) LIKE LOWER(:value) GROUP BY value ORDER BY value ASC", array( + $values = db_query_range("SELECT value FROM {profile_value} WHERE fid = :fid AND LOWER(value) LIKE LOWER(:value) GROUP BY value ORDER BY value ASC", 0, 10, array( ':fid' => $field, ':value' => $string . '%', - ), 0, 10)->fetchCol(); + ))->fetchCol(); foreach ($values as $value) { $matches[$value] = check_plain($value); } |