Merge pull request #81 from phl0/subdivisionTranslations

Basics for state translations
This commit is contained in:
Joerg
2024-01-15 17:03:13 +01:00
committed by GitHub
5 changed files with 2126 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 171;
$config['migration_version'] = 172;
/*
|--------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@@ -1653,13 +1653,14 @@ class Logbook_model extends CI_Model {
function get_qso($id, $trusted = false) {
if ($trusted || ($this->logbook_model->check_qso_is_accessible($id))) {
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload');
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload, primary_subdivisions.subdivision');
$this->db->from($this->config->item('table_name'));
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id', 'left');
$this->db->join('dxcc_entities as dxcc_entities_2', 'station_profile.station_dxcc = dxcc_entities_2.adif', 'left outer');
$this->db->join('eQSL_images', $this->config->item('table_name').'.COL_PRIMARY_KEY = eQSL_images.qso_id', 'left outer');
$this->db->join('lotw_users', $this->config->item('table_name').'.COL_CALL = lotw_users.callsign', 'left outer');
$this->db->join('primary_subdivisions', $this->config->item('table_name').'.COL_DXCC = primary_subdivisions.adif AND '.$this->config->item('table_name').'.COL_STATE = primary_subdivisions.state', 'left outer');
$this->db->where('COL_PRIMARY_KEY', $id);
return $this->db->get();

View File

@@ -242,7 +242,7 @@ class Timeline_model extends CI_Model
case 'waz': $this->db->where('COL_CQZ', $querystring); break;
case 'vucc': $this->db->group_start(); $this->db->like('COL_GRIDSQUARE', $querystring); $this->db->or_like('COL_VUCC_GRIDS',$querystring); $this->db->group_end();break;
}
$this->db->order_by('COL_TIME_ON', 'DEsC');
$this->db->order_by('COL_TIME_ON', 'DESC');
return $this->db->get($this->config->item('table_name'));
}

View File

@@ -175,7 +175,7 @@
<?php if($row->COL_STATE != null) { ?>
<tr>
<td><?php echo $primary_subdivision ?>:</td>
<td><?php echo $row->COL_STATE; ?></td>
<td><?php if ($row->subdivision != '') { echo $row->subdivision.' ('.$row->COL_STATE.')'; } else { echo $row->COL_STATE; } ?></td>
</tr>
<?php } ?>