From cb8f0efb62068b043c5b57edbb5ddc13d0849a25 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Wed, 29 Aug 2012 21:22:55 +0200 Subject: [PATCH] Fix nested group : when no server set and printTitle issue --- classes/Misc.php | 7 +++++-- servers.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/Misc.php b/classes/Misc.php index 735be483..2dc1b8a6 100644 --- a/classes/Misc.php +++ b/classes/Misc.php @@ -2258,8 +2258,11 @@ $srvs = array(); if (($group !== false) and ($group !== 'all')) - $group = array_fill_keys(explode(',', preg_replace('/\s/', '', - $conf['srv_groups'][$group]['servers'])), 1); + if (isset($conf['srv_groups'][$group]['servers'])) + $group = array_fill_keys(explode(',', preg_replace('/\s/', '', + $conf['srv_groups'][$group]['servers'])), 1); + else + $group = ''; foreach($conf['servers'] as $idx => $info) { $server_id = $info['host'].':'.$info['port'].':'.$info['sslmode']; diff --git a/servers.php b/servers.php index 3632eccb..746a5c4d 100644 --- a/servers.php +++ b/servers.php @@ -50,7 +50,7 @@ $misc->printTitle(sprintf($lang['strgroupgroups'],htmlentities($conf['srv_groups'][$group]['desc'], ENT_QUOTES, 'UTF-8'))); } - $misc->printTable($groups, $columns, $actions); + $misc->printTable($groups, $columns, $actions,'servers-servers'); $servers = $misc->getServers(true, $group); -- 2.39.5