Malishev Dmitry 14 лет назад
Родитель
Сommit
809d0a22c6
2 измененных файлов с 7 добавлено и 14 удалено
  1. 7 2
      web/vesta/api/MAIN.class.php
  2. 0 12
      web/vesta/app.init.php

+ 7 - 2
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
      * 

+ 0 - 12
web/vesta/app.init.php

@@ -1,17 +1,5 @@
 <?php
 
-$url = "http://dev.vestacp.com:8083/dispatch.php";  
-$useragent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";  
-$ch = curl_init();
-curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
-curl_setopt($ch, CURLOPT_POST, 1);
-curl_setopt($ch, CURLOPT_URL,$url);
-curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($_POST));
-$result= curl_exec ($ch);
-curl_close ($ch);
-die();
-
-
 define('V_ROOT_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
 
 require_once V_ROOT_DIR . 'config/Config.class.php';