mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-27 01:24:16 +00:00
Fixes ADIF so that the MY fields are set which tQSL can automatically use to select location
This commit is contained in:
@@ -62,23 +62,29 @@ class adif_data extends CI_Model {
|
||||
function export_custom($from, $to) {
|
||||
$this->load->model('stations');
|
||||
$active_station_id = $this->stations->find_active();
|
||||
$this->db->where('station_id', $active_station_id);
|
||||
|
||||
|
||||
$this->db->select(''.$this->config->item('table_name').'.*, station_profile.*');
|
||||
$this->db->from($this->config->item('table_name'));
|
||||
$this->db->where($this->config->item('table_name').'.station_id', $active_station_id);
|
||||
|
||||
// If date is set, we format the date and add it to the where-statement
|
||||
if ($from != 0) {
|
||||
$from = DateTime::createFromFormat('d/m/Y', $from);
|
||||
$from = $from->format('Y-m-d');
|
||||
$this->db->where("date(COL_TIME_ON) >= '".$from."'");
|
||||
$this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) >= '".$from."'");
|
||||
}
|
||||
if ($to != 0) {
|
||||
$to = DateTime::createFromFormat('d/m/Y', $to);
|
||||
$to = $to->format('Y-m-d');
|
||||
$this->db->where("date(COL_TIME_ON) <= '".$to."'");
|
||||
$this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) <= '".$to."'");
|
||||
}
|
||||
$this->db->order_by("COL_TIME_ON", "ASC");
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
$this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "ASC");
|
||||
|
||||
return $query;
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
$this->db->limit(4);
|
||||
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
function export_lotw() {
|
||||
|
||||
Reference in New Issue
Block a user