summaryrefslogtreecommitdiff
path: root/modules/profile
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-28 19:18:08 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-28 19:18:08 +0000
commita938e18a1bd36d887010863817470b690fdbf6f3 (patch)
treeadbc7edb165255a47739fdbe7e0184c241f6340c /modules/profile
parentff8b0618f5892d165720453efcd318b0d85a6f8c (diff)
downloadbrdo-a938e18a1bd36d887010863817470b690fdbf6f3.tar.gz
brdo-a938e18a1bd36d887010863817470b690fdbf6f3.tar.bz2
- Patch #491556 by Berdir: completed converting core to DBTNG. Oh my. Kudos to Berdir for this humongous effort.
Diffstat (limited to 'modules/profile')
-rw-r--r--modules/profile/profile.module2
-rw-r--r--modules/profile/profile.test2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index dc4f69526..bc3ecd6b6 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -341,7 +341,7 @@ function profile_view_profile(&$user) {
// Show private fields to administrators and people viewing their own account.
if (user_access('administer users') || $GLOBALS['user']->uid == $user->uid) {
- $result = db_query('SELECT * FROM {profile_field} WHERE visibility <> %d ORDER BY category, weight', PROFILE_HIDDEN);
+ $result = db_query('SELECT * FROM {profile_field} WHERE visibility <> :hidden ORDER BY category, weight', array(':hidden' => PROFILE_HIDDEN));
}
else {
$result = db_query('SELECT * FROM {profile_field} WHERE visibility <> :private AND visibility <> :hidden ORDER BY category, weight', array(':private' => PROFILE_PRIVATE, ':hidden' => PROFILE_HIDDEN));
diff --git a/modules/profile/profile.test b/modules/profile/profile.test
index e60883d59..ac6872efa 100644
--- a/modules/profile/profile.test
+++ b/modules/profile/profile.test
@@ -37,7 +37,7 @@ class ProfileTestCase extends DrupalWebTestCase {
$edit['explanation'] = $this->randomName(50);
$this->drupalPost('admin/user/profile/add/' . $type, $edit, t('Save field'));
- $fid = db_result(db_query("SELECT fid FROM {profile_field} WHERE title = '%s'", $title));
+ $fid = db_query("SELECT fid FROM {profile_field} WHERE title = :title", array(':title' => $title))->fetchField();
$this->assertTrue($fid, t('New Profile field has been entered in the database'));
// Check that the new field is appearing on the user edit form.