- Patch #92845 by chx: fixed contact module placeholders in e-mail messages.

5.x
Dries Buytaert 2006-11-07 12:09:55 +00:00
parent 9e7f41cd91
commit dd7b44c417
1 changed files with 2 additions and 2 deletions

View File

@ -514,7 +514,7 @@ function contact_mail_page_submit($form_id, $form_values) {
$from = $form_values['mail'];
// Compose the body:
$message[] = t("%name sent a message using the contact form at %form.", array('%name' => $form_values['name'], '%form' => url($_GET['q'], NULL, NULL, TRUE)));
$message[] = t("!name sent a message using the contact form at !form.", array('!name' => $form_values['name'], '!form' => url($_GET['q'], NULL, NULL, TRUE)));
$message[] = $form_values['message'];
// Tidy up the body:
@ -526,7 +526,7 @@ function contact_mail_page_submit($form_id, $form_values) {
$contact = db_fetch_object(db_query("SELECT * FROM {contact} WHERE cid = %d", $form_values['cid']));
// Format the category:
$subject = t('[%category] %subject', array('%category' => $contact->category, '%subject' => $form_values['subject']));
$subject = t('[!category] !subject', array('!category' => $contact->category, '!subject' => $form_values['subject']));
// Prepare the body:
$body = implode("\n\n", $message);