diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/contact.module | 4 | ||||
-rw-r--r-- | modules/contact/contact.module | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/contact.module b/modules/contact.module index 15e910057..03d23b579 100644 --- a/modules/contact.module +++ b/modules/contact.module @@ -286,10 +286,10 @@ function contact_mail_page_validate($form_id, &$form) { global $form_values; if (!$form['cid']) { // Look if there is only one category - $result = db_query('SELECT category FROM {contact}'); + $result = db_query('SELECT cid FROM {contact}'); if (db_num_rows($result) == 1) { $category = db_fetch_object($result); - $form_values['category'] = $category->category; + $form_values['cid'] = $category->category; } else { form_set_error('category', t('You must select a valid category.')); diff --git a/modules/contact/contact.module b/modules/contact/contact.module index 15e910057..03d23b579 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -286,10 +286,10 @@ function contact_mail_page_validate($form_id, &$form) { global $form_values; if (!$form['cid']) { // Look if there is only one category - $result = db_query('SELECT category FROM {contact}'); + $result = db_query('SELECT cid FROM {contact}'); if (db_num_rows($result) == 1) { $category = db_fetch_object($result); - $form_values['category'] = $category->category; + $form_values['cid'] = $category->category; } else { form_set_error('category', t('You must select a valid category.')); |