Skip to content

Commit f9d02fc

Browse files
committed
list-database-hosts refactoring
1 parent 3525b46 commit f9d02fc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

web/add/db/index.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,11 @@
121121

122122
// List available database servers
123123
$db_hosts = array();
124-
foreach ($db_types as $db_type ) {
125-
exec (VESTA_CMD."v-list-database-hosts ".$db_type." 'json'", $output, $return_var);
126-
$db_hosts_tmp = json_decode(implode('', $output), true);
127-
$db_hosts = array_merge($db_hosts, $db_hosts_tmp);
128-
unset($db_hosts_tmp);
129-
unset($output);
130-
}
124+
exec (VESTA_CMD."v-list-database-hosts 'json'", $output, $return_var);
125+
$db_hosts_tmp = json_decode(implode('', $output), true);
126+
$db_hosts = array_merge($db_hosts, $db_hosts_tmp);
127+
unset($db_hosts_tmp);
128+
unset($output);
131129

132130
// Display body
133131
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html');

0 commit comments

Comments
 (0)