Overview
SHA1:1d8fcfb0adcd9b3e10d8a69b89b2bf9b3add1dfe
Date: 2016-05-31 05:44:57
User: bohwaz
Comment:Ne pas utiliser lettre_infos si le champ n'existe pas.
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-05-31
06:13
[584b04bc0e] Fix [50852efa366bd9f1a7848441f88a235eca4cb94a] : empĂȘcher un admin de se tirer une balle dans le pied (user: bohwaz, tags: trunk)
05:44
[1d8fcfb0ad] Ne pas utiliser lettre_infos si le champ n'existe pas. (user: bohwaz, tags: trunk)
05:40
[1711419c1c] Fix SQL syntaxe invalide, boulet. (user: bohwaz, tags: trunk)
Changes

Modified src/include/lib/Garradin/Membres.php from [e460b08c95] to [699a89c410].

730
731
732
733
734
735
736

737
738




739

740
741
742
743
744
745
746
        $message .= "\n\n--\n".$config->get('nom_asso')."\n".$config->get('site_asso');

        if ($dest == 0)
            $where = 'id_categorie NOT IN (SELECT id FROM membres_categories WHERE cacher = 1)';
        else
            $where = 'id_categorie = '.(int)$dest;


        if ($subscribed_only)
        {




            $where .= ' AND lettre_infos = 1';

        }

        $db = DB::getInstance();
        $res = $db->query('SELECT email FROM membres WHERE LENGTH(email) > 0 AND '.$where.' ORDER BY id;');

        $sujet = '['.$config->get('nom_asso').'] '.$sujet;








>


>
>
>
>
|
>







730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
        $message .= "\n\n--\n".$config->get('nom_asso')."\n".$config->get('site_asso');

        if ($dest == 0)
            $where = 'id_categorie NOT IN (SELECT id FROM membres_categories WHERE cacher = 1)';
        else
            $where = 'id_categorie = '.(int)$dest;

        // FIXME: filtrage plus intelligent, car le champ lettre_infos peut ne pas exister
        if ($subscribed_only)
        {
            $champs = Config::getInstance()->get('champs_membres');

            if ($champs->get('lettre_infos'))
            {
                $where .= ' AND lettre_infos = 1';
            }
        }

        $db = DB::getInstance();
        $res = $db->query('SELECT email FROM membres WHERE LENGTH(email) > 0 AND '.$where.' ORDER BY id;');

        $sujet = '['.$config->get('nom_asso').'] '.$sujet;