Fix add_to_target has only 1 param.

This commit is contained in:
Laurent Destailleur 2019-09-09 13:45:25 +02:00
parent 28ba5abb89
commit d061e61d25

View File

@ -97,16 +97,14 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
* This is the main function that returns the array of emails * This is the main function that returns the array of emails
* *
* @param int $mailing_id Id of emailing * @param int $mailing_id Id of emailing
* @param array $cibles Array with targets
* @return int <0 if error, number of emails added if ok * @return int <0 if error, number of emails added if ok
*/ */
public function add_to_target($mailing_id, $cibles) public function add_to_target($mailing_id)
{ {
// phpcs:enable // phpcs:enable
$target = array(); $target = array();
$j = 0; $j = 0;
$sql = " select rowid as id, email, firstname, lastname, plan, partner"; $sql = " select rowid as id, email, firstname, lastname, plan, partner";
$sql.= " from ".MAIN_DB_PREFIX."myobject"; $sql.= " from ".MAIN_DB_PREFIX."myobject";
$sql.= " where email IS NOT NULL AND email != ''"; $sql.= " where email IS NOT NULL AND email != ''";
@ -161,7 +159,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
// ----- Your code end here ----- // ----- Your code end here -----
return parent::add_to_target($mailing_id, $target); return parent::addTargetsToDatabase($mailing_id, $target);
} }