Permalink
Browse files

Fix nested group : when no server set and printTitle issue

  • Loading branch information...
1 parent 6174e79 commit cb8f0efb62068b043c5b57edbb5ddc13d0849a25 @rjuju rjuju committed Aug 29, 2012
Showing with 6 additions and 3 deletions.
  1. +5 −2 classes/Misc.php
  2. +1 −1 servers.php
View
@@ -2258,8 +2258,11 @@ function getServers($recordset = false, $group = false) {
$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'];
View
@@ -50,7 +50,7 @@ function doDefault($msg = '') {
$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);

0 comments on commit cb8f0ef

Please sign in to comment.