Fix Error come from [Dolibarr-dev] Errors on comm/mailing/index.php page

mail
This commit is contained in:
fhenry 2013-04-05 09:23:31 +02:00
parent ef5c03fc99
commit 81b34f9918
12 changed files with 36 additions and 24 deletions

View File

@ -176,7 +176,7 @@ if ($result)
print "<tr $bc[$var]>";
print '<td nowrap="nowrap"><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.'</a></td>';
print '<td>'.dol_trunc($obj->titre,38).'</td>';
print '<td align="center">'.dol_print_date($obj->date_creat,'day').'</td>';
print '<td align="center">'.dol_print_date($db->jdate($obj->date_creat),'day').'</td>';
print '<td align="center">'.($obj->nbemail?$obj->nbemail:"0").'</td>';
$mailstatic=new Mailing($db);
print '<td align="right">'.$mailstatic->LibStatut($obj->statut,5).'</td>';

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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";

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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 '';
}

View File

@ -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 '';
}