Overview
Comment:Fix échappement des noms de champs à l'export
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA1: a3b50391450402b3a85660aa2cbcc6fca7ef142f
User & Date: bohwaz on 2018-12-09 20:09:03
Other Links: manifest | tags
Context
2018-12-10
23:21
Correction traitement de valeurs non fournies (null) check-in: f24cfb81db user: bohwaz tags: trunk, stable
2018-12-09
20:09
Fix échappement des noms de champs à l'export check-in: a3b5039145 user: bohwaz tags: trunk, stable
2018-12-07
10:06
Ce fichier ne sert plus check-in: 3c08230c8b 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;');