diff --git a/sources/Afup/Utils/Mailing.php b/sources/Afup/Utils/Mailing.php index aa5aa5290..ed33b8412 100644 --- a/sources/Afup/Utils/Mailing.php +++ b/sources/Afup/Utils/Mailing.php @@ -1,72 +1,16 @@ _bdd = $bdd; - } - - /** - * Ajoute un email dans la base - * - * @param int $id Identifiant du forum - * @param string $champs Champs à renvoyer - * @access public - * @return array + * @param Message $message + * @param string $body + * @return bool */ - function AjouterEmail($email, $blacklist = false) - { - $blacklist_sql = $blacklist ? '1' : '0'; - $email = $this->_bdd->echapper($email); - $requete = "REPLACE INTO afup_email (`email` ,`blacklist`) "; - $requete .= "VALUES ($email, $blacklist_sql);"; - return $this->_bdd->executer($requete); - } - - function BlacklistEmail($email, $blacklist = false) - { - return $this->AjouterEmail($email, true); - } - - /** - * Renvoit les informations concernant un forum - * - * @param int $id Identifiant du forum - * @param string $champs Champs à renvoyer - * @access public - * @return array - */ - function obtenirEmails($blacklist = false) - { - $blacklist_sql = $blacklist ? '1' : '0'; - $requete = 'SELECT'; - $requete .= ' '; - $requete .= 'FROM'; - $requete .= ' afup_email '; - $requete .= 'WHERE blacklist = ' . $blacklist_sql; - return $this->_bdd->obtenirEnregistrement($requete); - } - public static function envoyerMail(Message $message, $body) { $recipients = $message->getRecipients();