Exceptionhandling for emptyresults on Filtering

This commit is contained in:
int2001
2024-05-01 09:38:49 +00:00
parent ae7b6b12ec
commit 9a7fc719c5
3 changed files with 7 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ class Dxcluster_model extends CI_Model {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $dxcache_url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Wavelog '.$this->optionslib->get_option('version').' DXLookup');
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$jsonraw = curl_exec($ch);

View File

@@ -2085,7 +2085,6 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
$this->db->limit('2');
$query = $this->db->get($this->config->item('table_name'));
return $query->num_rows();
}

View File

@@ -48,12 +48,14 @@ $(function() {
table.page.len(50);
let oldtable=table.data();
table.clear();
let spots2render=0;
if (dxspots.length>0) {
dxspots.sort(SortByQrg);
dxspots.forEach((single) => {
if ((cwn == 'wkd') && (!(single.worked_dxcc))) { return; }
if ((cwn == 'cnf') && (!(single.cnfmd_dxcc))) { return; }
if ((cwn == 'ucnf') && ((single.cnfmd_dxcc))) { return; }
spots2render++;
var data=[];
if (single.cnfmd_dxcc) {
dxcc_wked_info="text-success";
@@ -120,6 +122,10 @@ $(function() {
table.clear();
table.draw();
}
if (spots2render == 0) {
table.clear();
table.draw();
}
});
} else {
table.clear();