Changeset 19018


Ignore:
Timestamp:
Nov 15, 2012, 8:34:42 AM (11 years ago)
Author:
cljosse
Message:

[extensions] mail_superviseur fix compatibility with contactform (option text/html)

Location:
extensions/Mail_supervisor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/mail_send.inc.php

    r19011 r19018  
    6060*************************************/
    6161static public function send_mail_subject($cvt_subject){
    62 
     62global $cl_cvt_subject;
     63$cl_cvt_subject=$cvt_subject;
    6364return $cvt_subject;
    6465}
     
    6768*************************************/
    6869static public function send_mail_content($content){
    69 global $myclContent;
     70global $myclContent,$cl_externe_content;
    7071$myclContent=$content ;
    71 
     72$cl_externe_content=true ;
    7273return $content;
    7374}
     
    135136    $args['subject'] = 'Piwigo';
    136137  }
     138
     139  global $cl_cvt_subject;
     140  if($cl_cvt_subject)
     141$args['subject']=$cl_cvt_subject;
     142
    137143  // Spring cleaning
    138144  $cvt_subject = trim(preg_replace('#[\n\r]+#s', '', $args['subject']));
     
    335341    // Header
    336342     if(count($content_type_list)>1)
    337        $content.= $conf_mail[$cache_key]['header'];
    338              
    339              global $myclContent;
     343                 $content.= $conf_mail[$cache_key]['header'];
     344    global $myclContent,$cl_externe_content;   
    340345             if (!isset($args['content']))  {
    341     $args['content'] = '';
    342  
    343 
    344              if($myclContent && $myclContent!="" ){
     346                  $args['content'] = '';
     347             if($cl_externe_content && $myclContent!="" ){
    345348                  $args['content'] = $myclContent;
    346349                  $myclContent="";
    347                   $content_type="";
     350                  if ($conf['ContactForm']['cf_mail_type'] == 'text/plain'){
     351
     352                      }else if ($conf['ContactForm']['cf_mail_type'] == 'text/html'){
     353                      $content_type ="";
     354                                     };
    348355                }
    349356     }             
    350 
     357 
    351358    // Content
    352359    if (($args['content_format'] == 'text/plain') and ($content_type == 'text/html'))    {
     
    363370      $content.= $args['content'];
    364371    }
    365    
     372    if(!$cl_externe_content){
    366373    // Footer
    367374    $content.= $conf_mail[$cache_key]['footer'];
    368 
     375    }
    369376  // Close boundary
    370377  if(count($content_type_list)>1)
  • extensions/Mail_supervisor/main.inc.php

    r19010 r19018  
    22/*
    33Plugin Name: Mail supervisor
    4 Version: 1.5.8.a
     4Version: 1.5.9
    55Description: Mail supervisor surveille l'envoie des mails.
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=315
Note: See TracChangeset for help on using the changeset viewer.