Ignore:
Timestamp:
May 13, 2014, 7:46:37 PM (10 years ago)
Author:
mistic100
Message:

fix unused content type, send copy as Bcc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/include/functions.inc.php

    r28324 r28458  
    1717    $page['is_homepage'] = false;
    1818
    19     $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.CONTACT_FORM_PUBLIC.'">'.l10n('Contact').'</a>';
     19    $page['section_title'] =
     20      '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'
     21      .$conf['level_separator']
     22      .'<a href="'.CONTACT_FORM_PUBLIC.'">'.l10n('Contact').'</a>';
    2023  }
    2124}
     
    233236
    234237  // get admin emails
    235   $emails = get_contact_emails($comm['group']);
    236   if (!count($emails))
     238  $to = get_contact_emails($comm['group']);
     239  if (!count($to))
    237240  {
    238241    $page['errors'][] = l10n('Error while sending e-mail');
     
    246249    $prefix = str_replace('%gallery_title%', $conf['gallery_title'], $conf['ContactForm']['cf_subject_prefix']);
    247250
    248     $from = $Cc = null;
     251    $from = $Cc = $Bcc = null;
    249252    if (!empty($comm['email']))
    250253    {
     
    255258      if ($comm['send_copy'])
    256259      {
     260        $Bcc = $to;
     261        $to = null;
    257262        $Cc = $from;
    258263      }
     
    263268
    264269    $result = pwg_mail(
    265       $emails,
     270      $to,
    266271      array(
    267272        'subject' => '['.$prefix.'] '.$comm['subject'],
     273        'content' => $comm['content'],
    268274        'mail_title' => $prefix,
    269275        'mail_subtitle' => $comm['subject'],
    270276        'content_format' => 'text/html',
     277        'email_format' => $conf['ContactForm']['cf_mail_type'],
    271278        'from' => $from,
    272279        'Cc' => $Cc,
     280        'Bcc' => $Bcc,
    273281        ),
    274282      array(
     
    328336  ORDER BY name ASC
    329337';
    330   $emails = array_from_query($query);
     338  $emails = query2array($query);
    331339
    332340  return $emails;
Note: See TracChangeset for help on using the changeset viewer.