From 809d0a22c65d7a0a3683116bd13e843f67e9f32e Mon Sep 17 00:00:00 2001 From: Malishev Dmitry Date: Mon, 5 Sep 2011 19:03:40 +0300 Subject: [PATCH] Fixed DB types --- web/vesta/api/MAIN.class.php | 9 +++++++-- web/vesta/app.init.php | 12 ------------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/web/vesta/api/MAIN.class.php b/web/vesta/api/MAIN.class.php index 1d996c30..44ad6d1a 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 90c54c9e..a4aa2976 100644 --- a/web/vesta/app.init.php +++ b/web/vesta/app.init.php @@ -1,17 +1,5 @@