Use central function to generate ADIF-Header

This commit is contained in:
int2001
2025-12-05 08:01:12 +00:00
parent ad11abe84b
commit 5e02b514ae
4 changed files with 14 additions and 24 deletions

View File

@@ -103,11 +103,7 @@ class adif extends CI_Controller {
header('Content-Disposition: attachment; filename="'.$filename.'"');
// Output ADIF header // No chance to use exportall-view any longer, because of chunking logic
echo "Wavelog ADIF export\n";
echo "<ADIF_VER:5>3.1.6\n";
echo "<PROGRAMID:".strlen($this->config->item('app_name')).">".$this->config->item('app_name')."\r\n";
echo "<PROGRAMVERSION:".strlen($this->optionslib->get_option('version')).">".$this->optionslib->get_option('version')."\r\n";
echo "<EOH>\n\n";
echo $this->adifhelper->getAdifHeader($this->config->item('app_name'),$this->optionslib->get_option('version'));
// Stream QSOs in 5K chunks
$offset = 0;
@@ -204,12 +200,7 @@ class adif extends CI_Controller {
header('Content-Type: text/plain; charset=utf-8');
header('Content-Disposition: attachment; filename="'.$filename.'"');
// Output ADIF header // No chance to use exportall-view any longer, because of chunking logic
echo "Wavelog ADIF export\n";
echo "<ADIF_VER:5>3.1.6\n";
echo "<PROGRAMID:".strlen($this->config->item('app_name')).">".$this->config->item('app_name')."\r\n";
echo "<PROGRAMVERSION:".strlen($this->optionslib->get_option('version')).">".$this->optionslib->get_option('version')."\r\n";
echo "<EOH>\n\n";
echo $this->adifhelper->getAdifHeader($this->config->item('app_name'),$this->optionslib->get_option('version'));
// Collect QSO IDs for LoTW marking (since we can't access all at once)
$qso_ids_for_lotw = [];