Ignore:
Timestamp:
Oct 16, 2009, 11:34:41 AM (15 years ago)
Author:
cljosse
Message:

[mail_supervisor] bug in corrige_header

Location:
extensions/Mail_supervisor
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/include/fonctions.php

    r4049 r4050  
    180180}
    181181//===============================================
    182 function not_is_empty($variable)
    183 {
    184 global $args;
    185 
    186  echo $variable." ".count($args[$variable]) ;
    187  if (isset($args[$variable]))
    188  
    189   {
    190  
    191      if ( count($args[$variable]) > 0) ;
    192         {
    193  echo count($args[$variable]) ;
    194         $args[$variable]=array_filter($args[$variable]);
    195  echo count($args[$variable]) ;
    196  
    197          }
    198   }
    199 }
    200        
    201 
    202 //=================================================================================
     182
    203183function corrige_header($Carbonne,$headers)
    204184        {
    205         global $mails_options,$conf_mail,$mailto,$args;
    206         $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.' : '.get_strict_email_list()."\n", $headers);
     185        global $mails_options,$conf_mail,$mailto,$args,$infos_message;
     186 
     187        if (!empty($args[$Carbonne]))
     188         {
     189 
     190                if ( count($args[$Carbonne]) > 0 )
     191                {
     192                  if ($mails_options[1] == 'on') {
     193                  // Correction "< >"
     194                        $list_mail  = get_strict_email_list(implode(',', $args[$Carbonne])) ;
     195                        $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.' : '.$list_mail."\n", $headers);
     196                        }
     197                }
     198        } else {
     199        // Raz Bcc, Cc dans headers
     200                        $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', "" , $headers);
     201        }
     202               
     203               
     204 
    207205return $headers;
    208206
  • extensions/Mail_supervisor/language/fr_FR/plugin.lang.php

    r4045 r4050  
    22global $lang ;
    33/*
    4 
    54$lang['nbm_msg_error_sending_email_to'] = 'Erreur lors de l\'envoi du mail à %s [%s].';
    65$lang['nbm_msg_mail_sent_to'] = 'Mail envoyé à %s [%s].';
     
    109$lang['nbm_msg_n_mails_not_send'] = '%s mails n\'ont pas été envoyés.';
    1110$lang['nbm_no_mail_to_send'] = 'Pas de mail à envoyer.';
    12 
    1311*/
    1412
  • extensions/Mail_supervisor/main.inc.php

    r4049 r4050  
    2424/*
    2525Plugin Name: Mail supervisor
    26 Version: 1.1.1
     26Version: 1.1.4
    2727Description:  Mail supervisor surveille l'envoie des mails.
    2828Plugin URI: http://piwigo.org/ext/extension_view.php?eid=315
     
    119119                if (!empty($args['Cc']))
    120120                        {
    121                         if ($mails_options[1] == 'on') {  $headers= corrige_header('Cc',$headers);}
     121                         $headers= corrige_header('Cc',$headers);
     122                                 
    122123                        }
    123124                if (!empty($args['Bcc']))
    124125                        {   
    125                                 if ($mails_options[1] == 'on') {  $headers      = corrige_header('Bcc',$headers);}
     126                                   $headers     = corrige_header('Bcc',$headers);
    126127                        }
    127128
Note: See TracChangeset for help on using the changeset viewer.