From: Jon Langseth Date: Wed, 18 Jan 2012 14:48:23 +0000 (+0100) Subject: adding provision URL as part of server-data in SQL X-Git-Url: https://git.defcon.no/?p=hermes;a=commitdiff_plain;h=0b40f80e4a3fbacf817b622bbcea4d2009610bae adding provision URL as part of server-data in SQL --- diff --git a/api/lib/common_functions.php b/api/lib/common_functions.php index 52d99e8..df76b57 100644 --- a/api/lib/common_functions.php +++ b/api/lib/common_functions.php @@ -22,7 +22,7 @@ function is_kamailio_domain ( $domain ) function get_servers( $domain ) { global $config; - $query = sprintf("SELECT registrar, r_port, proxy, p_port FROM %s WHERE domain = '%s'", + $query = sprintf("SELECT registrar, r_port, proxy, p_port, prov_url FROM %s WHERE domain = '%s'", $config['provision_servers_table'], sql_clean( $domain )); $servers = sql_dbquery_single( $config['provision_db'], $query ); diff --git a/doc/sql-data/sample-data.sql b/doc/sql-data/sample-data.sql index 9c5c0ed..4c744c7 100644 --- a/doc/sql-data/sample-data.sql +++ b/doc/sql-data/sample-data.sql @@ -471,7 +471,7 @@ UNLOCK TABLES; LOCK TABLES `servers` WRITE; /*!40000 ALTER TABLE `servers` DISABLE KEYS */; -INSERT INTO `servers` VALUES (1,'example.com','example.com',5062,'pbx.example.com',5060); +INSERT INTO `servers` VALUES (1,'example.com','example.com',5062,'pbx.example.com',5060,NULL); /*!40000 ALTER TABLE `servers` ENABLE KEYS */; UNLOCK TABLES; diff --git a/doc/sql-data/structure.sql b/doc/sql-data/structure.sql index aa05a75..eaf4260 100644 --- a/doc/sql-data/structure.sql +++ b/doc/sql-data/structure.sql @@ -1069,10 +1069,13 @@ CREATE TABLE `servers` ( `r_port` int(11) default NULL, `proxy` varchar(255) character set utf8 default NULL, `p_port` int(11) default NULL, - PRIMARY KEY (`id`) + `prov_url` text, + PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; + + -- -- Table structure for table `users` --