diff msitegen.inc.php @ 639:26ec29d2e728

Elements of arrays passed to selection list can be arrays themselves, the first element is used.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 03 Nov 2014 01:40:28 +0200
parents 79bbd09114c5
children 9fbbbb8628ff
line wrap: on
line diff
--- a/msitegen.inc.php	Mon Nov 03 01:40:06 2014 +0200
+++ b/msitegen.inc.php	Mon Nov 03 01:40:28 2014 +0200
@@ -296,8 +296,12 @@
 {
   $str = stGetOptionListStart($id, $indent, $outer, $size, $onChange);
 
-  foreach ($data as $name => $value)
-    $str .= stGetOptionListItem($value, ($value === $active), $name);
+  foreach ($data as $key => $value)
+  {
+    $str .= stGetOptionListItem($key,
+      ($key === $active),
+      is_array($value) ? $value[0] : $value);
+  }
 
   return $str.stGetOptionListEnd($indent, $outer);
 }