mirror of
https://github.com/magicbug/Cloudlog
synced 2026-08-13 17:49:35 -04:00
Introduced a useragent_helper with a function to generate a compliant User-Agent string for Cloudlog, and updated QRZ API calls in Qrz controller and Logbook_model to use this helper. This ensures consistent and QRZ-compliant User-Agent headers for all outgoing requests.
16 lines
482 B
PHP
16 lines
482 B
PHP
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
if (!function_exists('cloudlog_user_agent')) {
|
|
function cloudlog_user_agent(): string {
|
|
$CI = &get_instance();
|
|
if (!isset($CI->optionslib)) {
|
|
$CI->load->library('optionslib');
|
|
}
|
|
$version = $CI->optionslib->get_option('version');
|
|
$ua = 'Cloudlog';
|
|
if (!empty($version)) {
|
|
$ua .= '/' . $version;
|
|
}
|
|
return $ua;
|
|
}
|
|
}
|