summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/index.php b/index.php
index 8f661ac..f3b3249 100644
--- a/index.php
+++ b/index.php
@@ -40,10 +40,17 @@ final class LookingGlass {
$this->doc = $config['doc'];
}
+ private function router_count() {
+ if ($this->frontpage['router_count'] > 0)
+ return $this->frontpage['router_count'];
+ else
+ return count($this->routers);
+ }
+
private function render_routers() {
print('<div class="form-group">');
print('<label for="routers">Router to use</label>');
- print('<select size="'.$this->frontpage['router_count'].'" class="form-control" name="routers" id="routers">');
+ print('<select size="'.router_count().'" class="form-control" name="routers" id="routers">');
$first = true;
foreach (array_keys($this->routers) as $router) {