Commit 696ac8a9 authored by Dries's avatar Dries

- Patch #15937 by wulff: made it so that titles of profile fields only need to...

- Patch #15937 by wulff: made it so that titles of profile fields only need to be unique within a single category.
parent 173f528f
......@@ -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.'));
}
......
......@@ -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.'));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment