diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 3e6d71752dd..aa2e9a695db 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -427,7 +427,7 @@ if ($action == 'create') $(".fulldaystartmin").attr("disabled","disabled").val("00"); $(".fulldayendhour").attr("disabled","disabled").val("23"); $(".fulldayendmin").attr("disabled","disabled").val("59"); - $("#p2").attr("disabled","disabled").val(""); + $("#p2").removeAttr("disabled"); } } setdatefields(); diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 9ca2534d5ba..c8334d12516 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -176,7 +176,7 @@ if ($result) print ""; print ''.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.''; print ''.dol_trunc($obj->titre,38).''; - print ''.dol_print_date($obj->date_creat,'day').''; + print ''.dol_print_date($db->jdate($obj->date_creat),'day').''; print ''.($obj->nbemail?$obj->nbemail:"0").''; $mailstatic=new Mailing($db); print ''.$mailstatic->LibStatut($obj->statut,5).''; diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 0067f67af16..03dba577988 100755 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -88,9 +88,10 @@ class mailing_contacts1 extends MailingTargets * For example if this selector is used to extract 500 different * emails from a text file, this function must return 500. * + * @param string $sql Requete sql de comptage * @return int */ - function getNbOfRecipients() + function getNbOfRecipients($sql='') { global $conf; diff --git a/htdocs/core/modules/mailings/contacts2.modules.php b/htdocs/core/modules/mailings/contacts2.modules.php index 256522a6527..1d722cb938d 100755 --- a/htdocs/core/modules/mailings/contacts2.modules.php +++ b/htdocs/core/modules/mailings/contacts2.modules.php @@ -151,9 +151,10 @@ class mailing_contacts2 extends MailingTargets /** * Return here number of distinct emails returned by your selector. * + * @param string $sql Requete sql de comptage * @return int */ - function getNbOfRecipients() + function getNbOfRecipients($sql='') { global $conf; diff --git a/htdocs/core/modules/mailings/contacts3.modules.php b/htdocs/core/modules/mailings/contacts3.modules.php index 9baca3fb080..4c02090e6f1 100755 --- a/htdocs/core/modules/mailings/contacts3.modules.php +++ b/htdocs/core/modules/mailings/contacts3.modules.php @@ -157,9 +157,10 @@ class mailing_contacts3 extends MailingTargets /** * Return here number of distinct emails returned by your selector. * + * @param string $sql Requete sql de comptage * @return int Number of recipients */ - function getNbOfRecipients() + function getNbOfRecipients($sql='') { global $conf; diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index 518f565cec5..3251c330808 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -100,9 +100,10 @@ class mailing_example extends MailingTargets * For example if this selector is used to extract 500 different * emails from a text file, this function must return 500. * + * @param string $sql Requete sql de comptage * @return int */ - function getNbOfRecipients() + function getNbOfRecipients($sql='') { // CHANGE THIS: Optionnal diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 15897683c55..f264672be34 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -82,13 +82,15 @@ class mailing_fraise extends MailingTargets } - /* - * \brief Return here number of distinct emails returned by your selector. - * For example if this selector is used to extract 500 different - * emails from a text file, this function must return 500. - * \return int - */ - function getNbOfRecipients() + /** + * Return here number of distinct emails returned by your selector. + * For example if this selector is used to extract 500 different + * emails from a text file, this function must return 500. + * + * @param string $sql Requete sql de comptage + * @return int Nb of recipients + */ + function getNbOfRecipients($sql='') { $sql = "SELECT count(distinct(a.email)) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as a"; diff --git a/htdocs/core/modules/mailings/framboise.modules.php b/htdocs/core/modules/mailings/framboise.modules.php index 964dbdf8db6..3681ca43459 100644 --- a/htdocs/core/modules/mailings/framboise.modules.php +++ b/htdocs/core/modules/mailings/framboise.modules.php @@ -143,9 +143,10 @@ class mailing_framboise extends MailingTargets * For example if this selector is used to extract 500 different * emails from a text file, this function must return 500. * + * @param string $sql Requete sql de comptage * @return int Nb of recipients */ - function getNbOfRecipients() + function getNbOfRecipients($sql='') { global $conf; diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index 64992b251a1..e3ac383798e 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -77,13 +77,15 @@ class mailing_pomme extends MailingTargets } - /* - * \brief Return here number of distinct emails returned by your selector. - * For example if this selector is used to extract 500 different - * emails from a text file, this function must return 500. - * \return int - */ - function getNbOfRecipients() + /** + * Return here number of distinct emails returned by your selector. + * For example if this selector is used to extract 500 different + * emails from a text file, this function must return 500. + * + * @param string $sql Requete sql de comptage + * @return int Number of recipients + */ + function getNbOfRecipients($sql='') { global $conf; diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index dc4e41cd03f..bbf11a32ce5 100755 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -153,9 +153,10 @@ class mailing_thirdparties extends MailingTargets * For example if this selector is used to extract 500 different * emails from a text file, this function must return 500. * + * @param string $sql Requete sql de comptage * @return int Nb of recipients */ - function getNbOfRecipients() + function getNbOfRecipients($sql='') { global $conf; diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index 15b3ad6f0d4..75f67ca2c46 100755 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -179,7 +179,7 @@ class mailing_thirdparties_services_expired extends MailingTargets * @param string $option Option * @return int Number of recipients */ - function getNbOfRecipients($filter=1,$option='') + function getNbOfRecipients($sql,$filter=1,$option='') { $now=dol_now(); diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index 9dba055a675..f6f47db95bb 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -73,9 +73,10 @@ class mailing_xinputfile extends MailingTargets * For example if this selector is used to extract 500 different * emails from a text file, this function must return 500. * + * @param string $sql Requete sql de comptage * @return int '' means NA */ - function getNbOfRecipients() + function getNbOfRecipients($sql='') { return ''; } diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php index 3ffbcf58a62..a1c60bf527c 100644 --- a/htdocs/core/modules/mailings/xinputuser.modules.php +++ b/htdocs/core/modules/mailings/xinputuser.modules.php @@ -73,9 +73,10 @@ class mailing_xinputuser extends MailingTargets * For example if this selector is used to extract 500 different * emails from a text file, this function must return 500. * + * @param string $sql Requete sql de comptage * @return int '' means NA */ - function getNbOfRecipients() + function getNbOfRecipients($sql='') { return ''; }