Mercurial > hg > lukkari
comparison index.php @ 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 |
comparison
equal
deleted
inserted
replaced
139:0ccb459aaecb | 140:26d266a685ed |
---|---|
556 " <table>\n". | 556 " <table>\n". |
557 " <tr>\n". | 557 " <tr>\n". |
558 " <th>\n". | 558 " <th>\n". |
559 " <select name=\"luokka\">\n"; | 559 " <select name=\"luokka\">\n"; |
560 | 560 |
561 foreach ($classIDs as $id) | 561 if ($classIDs !== FALSE) |
562 { | 562 { |
563 echo | 563 foreach ($classIDs as $id) |
564 " <option ".($classID == $id ? "selected=\"selected\" " : ""). | 564 { |
565 "value=\"".$id."\">".chentities($id)."</option>\n"; | 565 echo |
566 " <option ".($classID == $id ? "selected=\"selected\" " : ""). | |
567 "value=\"".$id."\">".chentities($id)."</option>\n"; | |
568 } | |
566 } | 569 } |
567 | 570 |
568 echo | 571 echo |
569 " </select>\n". | 572 " </select>\n". |
570 " </th>\n". | 573 " </th>\n". |