Mercurial > hg > mgallery
diff 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 |
line wrap: on
line diff
--- a/mgallery.inc.php Fri Aug 02 12:54:51 2019 +0300 +++ b/mgallery.inc.php Sat Aug 03 06:18:18 2019 +0300 @@ -345,8 +345,15 @@ { switch ($mdef[0]) { - case MG_STR : return "\"".$val."\""; - case MG_BOOL : return $val ? "yes" : "no"; + case MG_STR: + if (is_array($val)) + return implode(", ", $val); + else + return "\"".$val."\""; + + case MG_BOOL: + return $val ? "yes" : "no"; + case MG_FLAGS: { $mstr = [];