Overview
SHA1 Hash:1484069bbe0a28d918b9ebdee01d193ac08f30b2
Date: 2012-03-11 23:58:53
User: bohwaz
Comment:Fixed [877f4fc1e7] (liste des adhérents avec un nom accentué)
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2012-03-22
21:41
[5fa9dd4639] + Réécriture et correction du remplacement des URLs + Ajout de référence arrière dans les regexp de la syntaxe SPIP (user: bohwaz, tags: trunk)
2012-03-11
23:58
[1484069bbe] Fixed [877f4fc1e7] (liste des adhérents avec un nom accentué) (user: bohwaz, tags: trunk)
23:53
[f56cf26db4] Fix [27ccb4671d] (Impossible de ne rendre aucun champ obligatoire) (user: bohwaz, tags: trunk)
Changes

Modified include/class.db.php from [c858b8cf7c] to [fea644c3be].

53
54
55
56
57
58
59


60
61
62
63
64
65
66

        if (!$exists)
        {
            $this->exec('BEGIN;');
            $this->exec(file_get_contents(GARRADIN_DB_SCHEMA));
            $this->exec('END;');
        }


    }

    public function escape($str)
    {
        return $this->escapeString($str);
    }








>
>







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

        if (!$exists)
        {
            $this->exec('BEGIN;');
            $this->exec(file_get_contents(GARRADIN_DB_SCHEMA));
            $this->exec('END;');
        }

        $this->createFunction('transliterate_to_ascii', array('utils', 'transliterateToAscii'));
    }

    public function escape($str)
    {
        return $this->escapeString($str);
    }

Modified include/class.membres.php from [c007dcee89] to [8422aaa3d4].

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
...
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
...
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
        if ($field == 'id' || $field == 'code_postal')
            $where = 'WHERE '.$field.' = \''.$db->escapeString($query).'\'';
        else
            $where = 'WHERE '.$field.' LIKE \'%'.$db->escapeString($query).'%\'';

        return $db->simpleStatementFetch(
            'SELECT id, id_categorie, nom, email, code_postal, ville, strftime(\'%s\', date_cotisation) AS date_cotisation FROM membres '.$where.'
                ORDER BY nom LIMIT 100;',
            SQLITE3_ASSOC
        );
    }

    public function listByCategory($cat = 0, $page = 1)
    {
        $begin = ($page - 1) * self::ITEMS_PER_PAGE;
................................................................................
        elseif (is_array($cat))
            $where = 'WHERE id_categorie IN ('.implode(',', $cat).')';
        else
            $where = '';

        return $db->simpleStatementFetch(
            'SELECT id, id_categorie, nom, email, code_postal, ville, strftime(\'%s\', date_cotisation) AS date_cotisation FROM membres '.$where.'
                ORDER BY nom LIMIT ?, ?;',
            SQLITE3_ASSOC,
            $begin,
            self::ITEMS_PER_PAGE
        );
    }

    public function countByCategory($cat = 0)
................................................................................
            $id = (int) $id;
        }

        $membres = implode(',', $membres);

        $db = Garradin_DB::getInstance();
        $db->exec('UPDATE wiki_revisions SET id_auteur = 0 WHERE id_auteur IN ('.$membres.');');
        $db->exec('DELETE FROM wiki_suivi WHERE id_membre IN ('.$membres.');');
        return $db->exec('DELETE FROM membres WHERE id IN ('.$membres.');');
    }

    public function sendMessageToCategory($dest, $sujet, $message)
    {
        $config = Garradin_Config::getInstance();








|







 







|







 







|







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
...
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
...
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
        if ($field == 'id' || $field == 'code_postal')
            $where = 'WHERE '.$field.' = \''.$db->escapeString($query).'\'';
        else
            $where = 'WHERE '.$field.' LIKE \'%'.$db->escapeString($query).'%\'';

        return $db->simpleStatementFetch(
            'SELECT id, id_categorie, nom, email, code_postal, ville, strftime(\'%s\', date_cotisation) AS date_cotisation FROM membres '.$where.'
                ORDER BY transliterate_to_ascii(nom) LIMIT 100;',
            SQLITE3_ASSOC
        );
    }

    public function listByCategory($cat = 0, $page = 1)
    {
        $begin = ($page - 1) * self::ITEMS_PER_PAGE;
................................................................................
        elseif (is_array($cat))
            $where = 'WHERE id_categorie IN ('.implode(',', $cat).')';
        else
            $where = '';

        return $db->simpleStatementFetch(
            'SELECT id, id_categorie, nom, email, code_postal, ville, strftime(\'%s\', date_cotisation) AS date_cotisation FROM membres '.$where.'
                ORDER BY transliterate_to_ascii(nom) LIMIT ?, ?;',
            SQLITE3_ASSOC,
            $begin,
            self::ITEMS_PER_PAGE
        );
    }

    public function countByCategory($cat = 0)
................................................................................
            $id = (int) $id;
        }

        $membres = implode(',', $membres);

        $db = Garradin_DB::getInstance();
        $db->exec('UPDATE wiki_revisions SET id_auteur = 0 WHERE id_auteur IN ('.$membres.');');
        //$db->exec('DELETE FROM wiki_suivi WHERE id_membre IN ('.$membres.');');
        return $db->exec('DELETE FROM membres WHERE id IN ('.$membres.');');
    }

    public function sendMessageToCategory($dest, $sujet, $message)
    {
        $config = Garradin_Config::getInstance();