diff options
author | Nat Lasseter <Nat Lasseter nathan@bytemark.co.uk> | 2018-02-02 10:55:28 +0000 |
---|---|---|
committer | Nat Lasseter <Nat Lasseter nathan@bytemark.co.uk> | 2018-02-02 10:55:28 +0000 |
commit | 8854d382910a27f66cf16afb66cd0741617168e4 (patch) | |
tree | 7472c54824abbc9dba9ffed7009cb0f70e24d158 | |
parent | 3e0ec40981f40c388b0347fb045e6f8f4292a397 (diff) |
Support a config item for the length of the routers list
-rw-r--r-- | includes/config.defaults.php | 4 | ||||
-rw-r--r-- | index.php | 2 |
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) @@ -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) { |