diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-01-24 21:39:58 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-01-24 21:39:58 +0000 |
commit | 696ac8a9d84d7d1c53052d29a93ea252b3e58ff0 (patch) | |
tree | bed4ec4e96525e68f6728a0d9a358dce83431476 /modules | |
parent | 173f528f59e6a83bdda973ef63c55659e6b1323b (diff) | |
download | brdo-696ac8a9d84d7d1c53052d29a93ea252b3e58ff0.tar.gz brdo-696ac8a9d84d7d1c53052d29a93ea252b3e58ff0.tar.bz2 |
- Patch #15937 by wulff: made it so that titles of profile fields only need to be unique within a single category.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/profile.module | 2 | ||||
-rw-r--r-- | modules/profile/profile.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/profile.module b/modules/profile.module index 94e28f130..2e4ef4e65 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -438,7 +438,7 @@ function profile_admin_add($type) { // Validate the form: profile_validate_form($data); - if (db_result(db_query("SELECT fid FROM {profile_fields} WHERE title = '%s'", $data['title']))) { + if (db_result(db_query("SELECT fid FROM {profile_fields} WHERE title = '%s' AND category = '%s'", $data['title'], $data['category']))) { form_set_error('title', t('The specified title is already in use.')); } diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 94e28f130..2e4ef4e65 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -438,7 +438,7 @@ function profile_admin_add($type) { // Validate the form: profile_validate_form($data); - if (db_result(db_query("SELECT fid FROM {profile_fields} WHERE title = '%s'", $data['title']))) { + if (db_result(db_query("SELECT fid FROM {profile_fields} WHERE title = '%s' AND category = '%s'", $data['title'], $data['category']))) { form_set_error('title', t('The specified title is already in use.')); } |