Changeset 4049


Ignore:
Timestamp:
Oct 16, 2009, 10:26:40 AM (15 years ago)
Author:
cljosse
Message:

[mail_supervisor] modif bug in fonctions.php

Location:
extensions/Mail_supervisor
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/admin

    • Property svn:ignore set to
      _notes
  • extensions/Mail_supervisor/include/fonctions.php

    r4045 r4049  
    2929if (!defined('MAIL_SUPERV_PATH')) define('MAIL_SUPERV_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
    3030
    31 load_language('plugin.lang', MAIL_SUPERV_PATH);
     31
    3232include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
    3333include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    3434
    3535include_once (MAIL_SUPERV_PATH.'include/function_test_send.php');
     36
     37load_language('plugin.lang', MAIL_SUPERV_PATH);
    3638
    3739global $period_search,$period_match ;
     
    7981                       
    8082                        `message`          = "'.$mails_données['message'].'",
    81                         `message_test`          = "'.$mails_données['message_test'].'",
     83                        `message_test`     = "'.$mails_données['message_test'].'",
    8284                        `header_text`      = "'.$mails_données['header_text'].'"
    8385                WHERE `id` =1 LIMIT 1 ';
     
    177179         return $data;
    178180}
     181//===============================================
     182function not_is_empty($variable)
     183{
     184global $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       
    179201
    180202//=================================================================================
     
    182204        {
    183205        global $mails_options,$conf_mail,$mailto,$args;
    184         $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.' : '.get_strict_email_list(implode(' , ', $args[$Carbonne]))."\n", $headers);
    185 
    186         return $headers;
     206        $headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.' : '.get_strict_email_list()."\n", $headers);
     207return $headers;
    187208
    188209               
     
    340361        '.time().',
    341362        2000,
    342         "1 week",
     363        "1 "'.l10n('Week').'",
    343364       
    344365        0,
    345366        '.time().',
    346367        10,
    347         "2 day",
     368        "2 "'.l10n('Day').'",
    348369       
    349370        false,
    350371        '.time().',
    351         "2 day",
     372        "2 "'.l10n('Day').'",
    352373       
    353374        "Init.",
     375        "'.l10n('supervisor').'",
    354376         "'.l10n('hello').'"
    355377         )
  • extensions/Mail_supervisor/language

    • Property svn:ignore set to
      _notes
  • extensions/Mail_supervisor/language/fr_FR

    • Property svn:ignore set to
      _notes
  • extensions/Mail_supervisor/main.inc.php

    r4045 r4049  
    9696                }   
    9797 if ($mailto<>"" )            $nb_destinataires +=1;
    98  if (!empty($args['Cc']))     $nb_destinataires += count($args['Cc']);
    99  if (!empty($args['Bcc']))    $nb_destinataires += count($args['Bcc']);
     98
     99                if (!empty($args['Bcc']))  { 
     100                        $nb_destinataires += count($args['Bcc']);
     101                        }
     102                if (!empty($args['Cc']))  {   
     103                        $nb_destinataires += count($args['Cc']);
     104                        }
    100105   //================= réécriture de l'entête ===============================
    101106if ( $nb_destinataires  == 1 )
     
    103108                if ($mailto == "" )
    104109                  {
    105                  
    106                           if (!empty($args['Cc']))  $mailto  = get_strict_email_list(implode(',', $args['Cc'])) ;
    107                           if (!empty($args['Bcc'])) $mailto  = get_strict_email_list(implode(',', $args['Bcc'])) ;
    108                          
     110                          if (!empty($args['Cc']) and count($args['Cc']) > 0 )  $mailto  = get_strict_email_list(implode(',', $args['Cc'])) ;
     111                          if (!empty($args['Bcc']) and count($args['Bcc']) > 0 ) $mailto  = get_strict_email_list(implode(',', $args['Bcc'])) ;
     112                         
    109113                                $headers = preg_replace('/.*Bcc(.*).\n/i', '', $headers);
    110114                                $headers = preg_replace('/.*Cc(.*).\n/i', '', $headers);
     115                               
    111116                  }
    112117        }else{
    113 
    114118   
    115119                if (!empty($args['Cc']))
     
    147151                 if ($nb_destinataires > 0) {
    148152                   $ret = mail($mailto, $subject, $content, $headers);
    149  
     153/* <br />
     154<b>Warning</b>:  mail() [<a href='function.mail'>function.mail</a>]: Trop de spam. Fonction mail() bloque.
     155 in <b>/mnt/102/sdb/9/5/cl.josse/Galerie/plugins/mail_supervisor/main.inc.php</b> on line <b>132</b><br />
     156*/
    150157                        }else{
    151158                           $message .='Nombre de destinataires = 0';
  • extensions/Mail_supervisor/maintain.inc.php

    r4041 r4049  
    6767
    6868         
    69 
     69   pwg_query( $q );
     70      $q = '
     71      DELETE FROM '.CONFIG_TABLE.'
     72      WHERE param="mail_superv"
     73    ;';
     74    pwg_query($q);
    7075               
    7176 
     
    7782
    7883
    79 vérif_base();
     84        vérif_base();
    8085
    8186}
Note: See TracChangeset for help on using the changeset viewer.