65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
'champ_identite' => $string,
'version' => $string,
];
$db = DB::getInstance();
$this->config = $db->simpleStatementFetchAssoc('SELECT cle, valeur FROM config ORDER BY cle;');
foreach ($this->config as $key=>&$value)
{
if (!array_key_exists($key, $this->fields_types))
{
// Ancienne clé de config qui n'est plus utilisée
continue;
|
|
|
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
'champ_identite' => $string,
'version' => $string,
];
$db = DB::getInstance();
$this->config = $db->getAssoc('SELECT cle, valeur FROM config ORDER BY cle;');
foreach ($this->config as $key=>&$value)
{
if (!array_key_exists($key, $this->fields_types))
{
// Ancienne clé de config qui n'est plus utilisée
continue;
|
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
break;
}
case 'categorie_cotisations':
case 'categorie_dons':
{
return false;
$db = DB::getInstance();
if (!$db->simpleQuerySingle('SELECT 1 FROM compta_categories WHERE id = ?;', false, $value))
{
throw new UserException('Champ '.$key.' : La catégorie comptable numéro \''.$value.'\' ne semble pas exister.');
}
break;
}
case 'categorie_membres':
{
$db = DB::getInstance();
if (!$db->simpleQuerySingle('SELECT 1 FROM membres_categories WHERE id = ?;', false, $value))
{
throw new UserException('La catégorie de membres par défaut numéro \''.$value.'\' ne semble pas exister.');
}
break;
}
case 'monnaie':
{
|
|
|
|
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
break;
}
case 'categorie_cotisations':
case 'categorie_dons':
{
return false;
$db = DB::getInstance();
if (!$db->firstColumn('SELECT 1 FROM compta_categories WHERE id = ?;', $value))
{
throw new UserException('Champ '.$key.' : La catégorie comptable numéro \''.$value.'\' ne semble pas exister.');
}
break;
}
case 'categorie_membres':
{
$db = DB::getInstance();
if (!$db->firstColumn('SELECT 1 FROM membres_categories WHERE id = ?;', $value))
{
throw new UserException('La catégorie de membres par défaut numéro \''.$value.'\' ne semble pas exister.');
}
break;
}
case 'monnaie':
{
|