summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-24 21:39:58 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-24 21:39:58 +0000
commit696ac8a9d84d7d1c53052d29a93ea252b3e58ff0 (patch)
treebed4ec4e96525e68f6728a0d9a358dce83431476
parent173f528f59e6a83bdda973ef63c55659e6b1323b (diff)
downloadbrdo-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.
-rw-r--r--modules/profile.module2
-rw-r--r--modules/profile/profile.module2
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.'));
}