Project

General

Profile

« Previous | Next » 

Revision 573ec19d

Added by Renato Botelho over 4 years ago

Add product_label global variable

Introduce product_label global variable, by default with same value of
product_name. The idea is to make it easier for rebranded products to
change the name on all visual texts while internal structures are
preserved.

While here, remove deprecated $g['platform'] and also replace places
with pfSense hardcoded on text messages by $g['product_label'].

No functional changes are expected.

View differences:

src/etc/inc/pfsense-utils.inc
2074 2074
	curl_setopt($ch, CURLOPT_HEADER, false);
2075 2075
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
2076 2076
	if (!isset($config['system']['do_not_send_uniqueid'])) {
2077
		curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version'] . ':' . system_get_uniqueid());
2077
		curl_setopt($ch, CURLOPT_USERAGENT, $g['product_label'] . '/' . $g['product_version'] . ':' . system_get_uniqueid());
2078 2078
	} else {
2079
		curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']);
2079
		curl_setopt($ch, CURLOPT_USERAGENT, $g['product_label'] . '/' . $g['product_version']);
2080 2080
	}
2081 2081

  
2082 2082
	if (!empty($config['system']['proxyurl'])) {
......
2130 2130
	curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connect_timeout);
2131 2131
	curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
2132 2132
	if (!isset($config['system']['do_not_send_uniqueid'])) {
2133
		curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version'] . ':' . system_get_uniqueid());
2133
		curl_setopt($ch, CURLOPT_USERAGENT, $g['product_label'] . '/' . $g['product_version'] . ':' . system_get_uniqueid());
2134 2134
	} else {
2135
		curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']);
2135
		curl_setopt($ch, CURLOPT_USERAGENT, $g['product_label'] . '/' . $g['product_version']);
2136 2136
	}
2137 2137

  
2138 2138
	if (!empty($config['system']['proxyurl'])) {

Also available in: Unified diff