Index: extensions/Mail_supervisor/include/fonctions.php
===================================================================
--- extensions/Mail_supervisor/include/fonctions.php	(revision 4045)
+++ extensions/Mail_supervisor/include/fonctions.php	(revision 4049)
@@ -29,9 +29,11 @@
 if (!defined('MAIL_SUPERV_PATH')) define('MAIL_SUPERV_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/');
 
-load_language('plugin.lang', MAIL_SUPERV_PATH);
+
 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
 
 include_once (MAIL_SUPERV_PATH.'include/function_test_send.php'); 
+
+load_language('plugin.lang', MAIL_SUPERV_PATH);
 
 global $period_search,$period_match ;
@@ -79,5 +81,5 @@
 			
 			`message`          = "'.$mails_données['message'].'",
-			`message_test`          = "'.$mails_données['message_test'].'",
+			`message_test`     = "'.$mails_données['message_test'].'",
 			`header_text`      = "'.$mails_données['header_text'].'"
 		WHERE `id` =1 LIMIT 1 ';
@@ -177,4 +179,24 @@
 	 return $data;
 }
+//===============================================
+function not_is_empty($variable)
+{
+global $args;
+
+ echo $variable." ".count($args[$variable]) ;
+ if (isset($args[$variable]))
+ 
+  {
+ 
+     if ( count($args[$variable]) > 0) ;
+	{
+ echo count($args[$variable]) ;
+	$args[$variable]=array_filter($args[$variable]);
+ echo count($args[$variable]) ;
+ 
+	 }
+  }
+}
+	
 
 //=================================================================================
@@ -182,7 +204,6 @@
 	{
 	global $mails_options,$conf_mail,$mailto,$args;
-	$headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.' : '.get_strict_email_list(implode(' , ', $args[$Carbonne]))."\n", $headers);
-
-	return $headers;
+ 	$headers = preg_replace('/.*'.$Carbonne.'(.*).\n/i', $Carbonne.' : '.get_strict_email_list()."\n", $headers);
+return $headers;
 
 		
@@ -340,16 +361,17 @@
 	'.time().',
 	2000,
-	"1 week",
+	"1 "'.l10n('Week').'",
 	
 	0,
 	'.time().',
 	10,
-	"2 day",
+	"2 "'.l10n('Day').'",
 	
 	false,
 	'.time().',
-	"2 day",
+	"2 "'.l10n('Day').'",
 	
 	"Init.",
+	"'.l10n('supervisor').'",
 	 "'.l10n('hello').'"
 	 )
Index: extensions/Mail_supervisor/main.inc.php
===================================================================
--- extensions/Mail_supervisor/main.inc.php	(revision 4045)
+++ extensions/Mail_supervisor/main.inc.php	(revision 4049)
@@ -96,6 +96,11 @@
 		}    
  if ($mailto<>"" )            $nb_destinataires +=1; 
- if (!empty($args['Cc']))     $nb_destinataires += count($args['Cc']);
- if (!empty($args['Bcc']))    $nb_destinataires += count($args['Bcc']);
+
+ 		if (!empty($args['Bcc']))  {  
+ 			$nb_destinataires += count($args['Bcc']); 
+			} 
+		if (!empty($args['Cc']))  {   
+ 			$nb_destinataires += count($args['Cc']); 
+			}
    //================= réécriture de l'entête ===============================
 if ( $nb_destinataires  == 1 )
@@ -103,13 +108,12 @@
 		if ($mailto == "" ) 
 		  {
-		  
-		  	  if (!empty($args['Cc']))  $mailto  = get_strict_email_list(implode(',', $args['Cc'])) ;
-	 	 	  if (!empty($args['Bcc'])) $mailto  = get_strict_email_list(implode(',', $args['Bcc'])) ;
-			  
+		  	  if (!empty($args['Cc']) and count($args['Cc']) > 0 )  $mailto  = get_strict_email_list(implode(',', $args['Cc'])) ;
+	 	 	  if (!empty($args['Bcc']) and count($args['Bcc']) > 0 ) $mailto  = get_strict_email_list(implode(',', $args['Bcc'])) ;
+			 
 				$headers = preg_replace('/.*Bcc(.*).\n/i', '', $headers);
 				$headers = preg_replace('/.*Cc(.*).\n/i', '', $headers);
+				
 		  }
 	}else{
-
    
 		if (!empty($args['Cc']))
@@ -147,5 +151,8 @@
 		 if ($nb_destinataires > 0) {
    	           $ret = mail($mailto, $subject, $content, $headers);
- 
+/* <br />
+<b>Warning</b>:  mail() [<a href='function.mail'>function.mail</a>]: Trop de spam. Fonction mail() bloque.
+ in <b>/mnt/102/sdb/9/5/cl.josse/Galerie/plugins/mail_supervisor/main.inc.php</b> on line <b>132</b><br />
+*/
 			}else{
 			   $message .='Nombre de destinataires = 0';
Index: extensions/Mail_supervisor/maintain.inc.php
===================================================================
--- extensions/Mail_supervisor/maintain.inc.php	(revision 4045)
+++ extensions/Mail_supervisor/maintain.inc.php	(revision 4049)
@@ -67,5 +67,10 @@
 
 	 
-
+   pwg_query( $q );
+      $q = '
+      DELETE FROM '.CONFIG_TABLE.'
+      WHERE param="mail_superv"
+    ;';
+    pwg_query($q);
 		
   
@@ -77,5 +82,5 @@
 
 
-vérif_base();
+	vérif_base();
 
 }
