kopia lustrzana https://github.com/magicbug/Cloudlog
Added filtering on maxAge / de-cont to bandmap (apply settings)
rodzic
355aef7af8
commit
c62a4c70a0
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Ładowanie…
Reference in New Issue