Commit c17ff754 authored by Dries's avatar Dries
Browse files

- Patch #40397 by DriesK: global contact mails are not sent.

parent 1d0fa04d
......@@ -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.'));
......
......@@ -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.'));
......
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