Mercurial > hg > mgallery
comparison mgallery.inc.php @ 298:cf166dcc6e77
Handle arrays in some way (not useful way, tho.) in config dumping.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 03 Aug 2019 06:18:18 +0300 |
parents | 77f85b1f35f2 |
children | 6bb434968623 |
comparison
equal
deleted
inserted
replaced
297:77f85b1f35f2 | 298:cf166dcc6e77 |
---|---|
343 | 343 |
344 function mgGetDValStr($mdef, $val) | 344 function mgGetDValStr($mdef, $val) |
345 { | 345 { |
346 switch ($mdef[0]) | 346 switch ($mdef[0]) |
347 { | 347 { |
348 case MG_STR : return "\"".$val."\""; | 348 case MG_STR: |
349 case MG_BOOL : return $val ? "yes" : "no"; | 349 if (is_array($val)) |
350 return implode(", ", $val); | |
351 else | |
352 return "\"".$val."\""; | |
353 | |
354 case MG_BOOL: | |
355 return $val ? "yes" : "no"; | |
356 | |
350 case MG_FLAGS: | 357 case MG_FLAGS: |
351 { | 358 { |
352 $mstr = []; | 359 $mstr = []; |
353 foreach ($mdef[2] as $vkey => $vval) | 360 foreach ($mdef[2] as $vkey => $vval) |
354 { | 361 { |