Skip to content

Commit 809d0a2

Browse files
committed
Fixed DB types
1 parent 4cccadf commit 809d0a2

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

web/vesta/api/MAIN.class.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function getInitialExecute(Request $request)
6161
$data_web_domain = array('ips' => $ips);
6262
$data_ip = array('user_names' => $user_names, 'interfaces' => $interfaces);
6363
$data_dns = array('ips' => $ips);
64-
$data_db = array('db_types' => $db_types);
64+
$data_db = array('db_types' => $this->getDBTypes());
6565
$data_users = array('user_names' => $user_names);
6666

6767
$reply = array(
@@ -187,13 +187,18 @@ public function getDnsParams($data = array())
187187
*/
188188
public function getDbParams($data = array())
189189
{
190-
$db_types = array('mysql' => 'mysql', 'postgre' => 'postgre');
190+
$db_types = $this->getDBTypes();
191191
return array(
192192
'TYPE' => $db_types,
193193
'HOST' => array('vestacp.com' => 'vestacp.com', 'askcow.org' => 'askcow.org')
194194
);
195195
}
196196

197+
public function getDBTypes()
198+
{
199+
return array('mysql' => 'mysql', 'postgre' => 'postgre');
200+
}
201+
197202
/**
198203
* Users initial params
199204
*

web/vesta/app.init.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
<?php
22

3-
$url = "http://dev.vestacp.com:8083/dispatch.php";
4-
$useragent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
5-
$ch = curl_init();
6-
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
7-
curl_setopt($ch, CURLOPT_POST, 1);
8-
curl_setopt($ch, CURLOPT_URL,$url);
9-
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($_POST));
10-
$result= curl_exec ($ch);
11-
curl_close ($ch);
12-
die();
13-
14-
153
define('V_ROOT_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
164

175
require_once V_ROOT_DIR . 'config/Config.class.php';

0 commit comments

Comments
 (0)