diff --git a/web/vesta/api/MAIN.class.php b/web/vesta/api/MAIN.class.php index 1d996c300..44ad6d1a6 100644 --- a/web/vesta/api/MAIN.class.php +++ b/web/vesta/api/MAIN.class.php @@ -61,7 +61,7 @@ class MAIN extends AjaxHandler $data_web_domain = array('ips' => $ips); $data_ip = array('user_names' => $user_names, 'interfaces' => $interfaces); $data_dns = array('ips' => $ips); - $data_db = array('db_types' => $db_types); + $data_db = array('db_types' => $this->getDBTypes()); $data_users = array('user_names' => $user_names); $reply = array( @@ -187,13 +187,18 @@ class MAIN extends AjaxHandler */ public function getDbParams($data = array()) { - $db_types = array('mysql' => 'mysql', 'postgre' => 'postgre'); + $db_types = $this->getDBTypes(); return array( 'TYPE' => $db_types, 'HOST' => array('vestacp.com' => 'vestacp.com', 'askcow.org' => 'askcow.org') ); } + public function getDBTypes() + { + return array('mysql' => 'mysql', 'postgre' => 'postgre'); + } + /** * Users initial params * diff --git a/web/vesta/app.init.php b/web/vesta/app.init.php index 90c54c9e3..a4aa29760 100644 --- a/web/vesta/app.init.php +++ b/web/vesta/app.init.php @@ -1,17 +1,5 @@