From 5779ade6707ba530517da239d9ec3fc751d17d83 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 31 Jul 2015 10:03:34 -0300 Subject: Introduce a new item to $g global, 'product_version' and stop reading /etc/version all around --- usr/local/www/crash_reporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local/www/crash_reporter.php') diff --git a/usr/local/www/crash_reporter.php b/usr/local/www/crash_reporter.php index 24cb36f..3b00e47 100644 --- a/usr/local/www/crash_reporter.php +++ b/usr/local/www/crash_reporter.php @@ -57,7 +57,7 @@ function upload_crash_report($files) { curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version"))); + curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']); curl_setopt($ch, CURLOPT_URL, $g['crashreporterurl']); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); -- cgit v1.1