summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Lasseter <Nat Lasseter nathan@bytemark.co.uk>2018-02-02 10:55:28 +0000
committerNat Lasseter <Nat Lasseter nathan@bytemark.co.uk>2018-02-02 10:55:28 +0000
commit8854d382910a27f66cf16afb66cd0741617168e4 (patch)
tree7472c54824abbc9dba9ffed7009cb0f70e24d158
parent3e0ec40981f40c388b0347fb045e6f8f4292a397 (diff)
Support a config item for the length of the routers list
-rw-r--r--includes/config.defaults.php4
-rw-r--r--index.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/includes/config.defaults.php b/includes/config.defaults.php
index db0b1cf..87784df 100644
--- a/includes/config.defaults.php
+++ b/includes/config.defaults.php
@@ -69,7 +69,9 @@ $config = array(
// Show visitor IP address
'show_visitor_ip' => true,
// Frontpage order you can use: routers, commands, parameter, buttons
- 'order' => array('routers', 'commands', 'parameter', 'buttons')
+ 'order' => array('routers', 'commands', 'parameter', 'buttons'),
+ // Number of routers to show on frontpage
+ 'router_count' => 5
),
// Contact (both null for no contact)
diff --git a/index.php b/index.php
index 64e72bb..714bed6 100644
--- a/index.php
+++ b/index.php
@@ -42,7 +42,7 @@ final class LookingGlass {
private function render_routers() {
print('<div class="form-group">');
print('<label for="routers">Router to use</label>');
- print('<select size="5" class="form-control" name="routers" id="routers">');
+ print('<select size="'.$this->frontpage['router_count'].'" class="form-control" name="routers" id="routers">');
$first = true;
foreach (array_keys($this->routers) as $router) {