mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 13:24:25 -07:00
list-database-hosts refactoring
This commit is contained in:
parent
3525b46205
commit
f9d02fce88
1 changed files with 5 additions and 7 deletions
|
@ -121,13 +121,11 @@ $db_types = split(",",$_SESSION['DB_SYSTEM']);
|
||||||
|
|
||||||
// List available database servers
|
// List available database servers
|
||||||
$db_hosts = array();
|
$db_hosts = array();
|
||||||
foreach ($db_types as $db_type ) {
|
exec (VESTA_CMD."v-list-database-hosts 'json'", $output, $return_var);
|
||||||
exec (VESTA_CMD."v-list-database-hosts ".$db_type." 'json'", $output, $return_var);
|
|
||||||
$db_hosts_tmp = json_decode(implode('', $output), true);
|
$db_hosts_tmp = json_decode(implode('', $output), true);
|
||||||
$db_hosts = array_merge($db_hosts, $db_hosts_tmp);
|
$db_hosts = array_merge($db_hosts, $db_hosts_tmp);
|
||||||
unset($db_hosts_tmp);
|
unset($db_hosts_tmp);
|
||||||
unset($output);
|
unset($output);
|
||||||
}
|
|
||||||
|
|
||||||
// Display body
|
// Display body
|
||||||
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html');
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/add_db.html');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue