diff --git a/application/controllers/Dxcluster.php b/application/controllers/Dxcluster.php index 807e3793..af10c8cf 100644 --- a/application/controllers/Dxcluster.php +++ b/application/controllers/Dxcluster.php @@ -11,8 +11,14 @@ class Dxcluster extends CI_Controller { } - function spots($band,$age = 60) { - $calls_found=$this->logbook_model->dxc_spotlist($band, $age); + function spots($band,$age = '', $de = '') { + if ($age == '') { + $age = $this->optionslib->get_option('dxcluster_maxage'); + } + if ($de == '') { + $de = $this->optionslib->get_option('dxcluster_decont'); + } + $calls_found=$this->logbook_model->dxc_spotlist($band, $age, $de); header('Content-Type: application/json'); if ($calls_found) { echo json_encode($calls_found, JSON_PRETTY_PRINT); diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 704e5bad..a3327d22 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -3993,7 +3993,7 @@ class Logbook_model extends CI_Model { return false; } - public function dxc_spotlist($band = '20m',$maxage = 60) { + public function dxc_spotlist($band = '20m',$maxage = 60, $de = '') { $CI =& get_instance(); if ( ($this->optionslib->get_option('dxcache_url') != '') ) { $dxcache_url = $this->optionslib->get_option('dxcache_url').'/spots/'; @@ -4025,7 +4025,13 @@ class Logbook_model extends CI_Model { if ($minutes<=$maxage) { $dxcc=$this->dxcc_lookup($singlespot->spotter,date('Ymd', time())); $singlespot->dxcc_spotter=$dxcc; - array_push($spotsout,$singlespot); + if ($de != '') { + if ($de == $dxcc['cont']) { + array_push($spotsout,$singlespot); + } + } else { + array_push($spotsout,$singlespot); + } } } return ($spotsout);