Overview
SHA1:a3b50391450402b3a85660aa2cbcc6fca7ef142f
Date: 2018-12-09 20:09:03
User: bohwaz
Comment:Fix échappement des noms de champs à l'export
Timelines: family | ancestors | descendants | both | trunk | stable
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2018-12-10
23:21
[f24cfb81db] Correction traitement de valeurs non fournies (null) (user: bohwaz, tags: trunk, stable)
2018-12-09
20:09
[a3b5039145] Fix échappement des noms de champs à l'export (user: bohwaz, tags: trunk, stable)
2018-12-07
10:06
[3c08230c8b] Ce fichier ne sert plus (user: bohwaz, tags: trunk, stable)
Changes

Modified src/include/lib/Garradin/Membres/Import.php from [e0ef7a7acb] to [db87ef00f2].

285
286
287
288
289
290
291

292
293
294
295
296
297
298
	}

	protected function export(array $list = null)
	{
		$db = DB::getInstance();

		$champs = Config::getInstance()->get('champs_membres')->getKeys();

		$champs_sql = 'm.' . implode(', m.', $champs);
		$where = $list ? 'WHERE ' . $db->where('m.id', $list) : '';

		$res = $db->iterate('SELECT ' . $champs_sql . ', c.nom AS "Catégorie membre" FROM membres AS m 
			INNER JOIN membres_categories AS c ON m.id_categorie = c.id
			' . $where . '
			ORDER BY c.id;');







>







285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
	}

	protected function export(array $list = null)
	{
		$db = DB::getInstance();

		$champs = Config::getInstance()->get('champs_membres')->getKeys();
		$champs = array_map([$db, 'quoteIdentifier'], $champs);
		$champs_sql = 'm.' . implode(', m.', $champs);
		$where = $list ? 'WHERE ' . $db->where('m.id', $list) : '';

		$res = $db->iterate('SELECT ' . $champs_sql . ', c.nom AS "Catégorie membre" FROM membres AS m 
			INNER JOIN membres_categories AS c ON m.id_categorie = c.id
			' . $where . '
			ORDER BY c.id;');