From 16931004ec5d0ee2d33f5059c29a347fef783812 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sun, 16 Jan 2022 13:36:05 -0500 Subject: [PATCH] Simplified Telemetry Opt in and fixed Telemetry URL --- setup.php | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/setup.php b/setup.php index 214fba35..4e73fd3e 100644 --- a/setup.php +++ b/setup.php @@ -570,26 +570,18 @@ if(isset($_POST['add_company_settings'])){ if(isset($_POST['add_telemetry'])){ - $comments = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['comments']))); + if($_POST['share_data'] == 1){ - $sql = mysqli_query($mysqli,"SELECT * FROM companies LIMIT 1"); - $row = mysqli_fetch_array($sql); + $comments = trim(strip_tags($_POST['comments'])); + + $sql = mysqli_query($mysqli,"SELECT * FROM companies LIMIT 1"); + $row = mysqli_fetch_array($sql); - $comments = $_POST['comments']; - - - if($_POST['company_name'] == 1){ $company_name = $row['company_name']; - } - - if($_POST['geographics'] == 1){ $city = $row['company_city']; $state = $row['company_state']; $country = $row['company_country']; $currency = $row['company_currency']; - } - - if($_POST['geographics'] == 1 OR $_POST['company_name'] == 1){ $postdata = http_build_query( array( @@ -612,7 +604,7 @@ if(isset($_POST['add_telemetry'])){ $context = stream_context_create($opts); - $result = file_get_contents('https://telemetry.itflow.com', false, $context); + $result = file_get_contents('https://telemetry.itflow.org', false, $context); echo $result; @@ -1017,18 +1009,13 @@ if(isset($_POST['add_telemetry'])){
-
Choose the data you would like to share with us
+
Would you like to share some data with us?

-
- - -
-
- - + +