Mercurial > hg > lukkari
changeset 140:26d266a685ed
Fix handling of class selection when no class list is available.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 27 Aug 2014 21:31:29 +0300 |
parents | 0ccb459aaecb |
children | 36fb1ce941d5 |
files | index.php |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/index.php Wed Aug 27 21:21:29 2014 +0300 +++ b/index.php Wed Aug 27 21:31:29 2014 +0300 @@ -558,11 +558,14 @@ " <th>\n". " <select name=\"luokka\">\n"; -foreach ($classIDs as $id) +if ($classIDs !== FALSE) { - echo - " <option ".($classID == $id ? "selected=\"selected\" " : ""). - "value=\"".$id."\">".chentities($id)."</option>\n"; + foreach ($classIDs as $id) + { + echo + " <option ".($classID == $id ? "selected=\"selected\" " : ""). + "value=\"".$id."\">".chentities($id)."</option>\n"; + } } echo