Overview
Comment: | Ne pas essayer d'envoyer des mails à des adresses vides (signalé par @Nicolas) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | stable |
Files: | files | file ages | folders |
SHA1: |
20f13bfbabd2eb9e433ae235162097b0 |
User & Date: | bohwaz on 2019-01-26 10:40:36 |
Other Links: | manifest | tags |
Context
2019-01-26
| ||
12:13 | Correction ajout cotisation membre check-in: 7e98e7c8ee user: bohwaz tags: trunk, stable | |
10:40 | Ne pas essayer d'envoyer des mails à des adresses vides (signalé par @Nicolas) check-in: 20f13bfbab user: bohwaz tags: trunk, stable | |
10:37 | Le numéro doit être dans les numéros, pas les ID check-in: 06e018482d user: bohwaz tags: trunk, stable | |
Changes
Modified src/include/lib/Garradin/Membres.php from [f75ceb8321] to [89209054f9].
︙ | ︙ | |||
346 347 348 349 350 351 352 | { Utils::sendEmail(Utils::EMAIL_CONTEXT_BULK, $config->get('email_asso'), $subject, $message); } return true; } | | > | | 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | { Utils::sendEmail(Utils::EMAIL_CONTEXT_BULK, $config->get('email_asso'), $subject, $message); } return true; } public function listAllByCategory($id_categorie, $only_with_email = false) { $where = $only_with_email ? ' AND email IS NOT NULL' : ''; return DB::getInstance()->get('SELECT id, email FROM membres WHERE id_categorie = ?' . $where, (int)$id_categorie); } public function listByCategory($cat, $fields, $page = 1, $order = null, $desc = false) { $begin = ($page - 1) * self::ITEMS_PER_PAGE; $db = DB::getInstance(); |
︙ | ︙ |
Modified src/www/admin/membres/message_collectif.php from [528d973d74] to [4372383f21].
︙ | ︙ | |||
14 15 16 17 18 19 20 | 'recipients' => 'required|string', ]); if (preg_match('/^(categorie|recherche)_(\d+)$/', f('recipients'), $match)) { if ($match[1] == 'categorie') { | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 'recipients' => 'required|string', ]); if (preg_match('/^(categorie|recherche)_(\d+)$/', f('recipients'), $match)) { if ($match[1] == 'categorie') { $recipients = $membres->listAllByCategory($match[2], true); } else { $recipients = $recherche->search($match[2], 'id, email'); } if (!count($recipients) || !isset($recipients[0]->email)) |
︙ | ︙ |