Added filtering on maxAge / de-cont to bandmap (apply settings)
这个提交包含在:
父节点
355aef7af8
当前提交
c62a4c70a0
共有 2 个文件被更改,包括 16 次插入 和 4 次删除
|
|
@ -11,8 +11,14 @@ class Dxcluster extends CI_Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function spots($band,$age = 60) {
|
function spots($band,$age = '', $de = '') {
|
||||||
$calls_found=$this->logbook_model->dxc_spotlist($band, $age);
|
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');
|
header('Content-Type: application/json');
|
||||||
if ($calls_found) {
|
if ($calls_found) {
|
||||||
echo json_encode($calls_found, JSON_PRETTY_PRINT);
|
echo json_encode($calls_found, JSON_PRETTY_PRINT);
|
||||||
|
|
|
||||||
|
|
@ -3993,7 +3993,7 @@ class Logbook_model extends CI_Model {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dxc_spotlist($band = '20m',$maxage = 60) {
|
public function dxc_spotlist($band = '20m',$maxage = 60, $de = '') {
|
||||||
$CI =& get_instance();
|
$CI =& get_instance();
|
||||||
if ( ($this->optionslib->get_option('dxcache_url') != '') ) {
|
if ( ($this->optionslib->get_option('dxcache_url') != '') ) {
|
||||||
$dxcache_url = $this->optionslib->get_option('dxcache_url').'/spots/';
|
$dxcache_url = $this->optionslib->get_option('dxcache_url').'/spots/';
|
||||||
|
|
@ -4025,8 +4025,14 @@ class Logbook_model extends CI_Model {
|
||||||
if ($minutes<=$maxage) {
|
if ($minutes<=$maxage) {
|
||||||
$dxcc=$this->dxcc_lookup($singlespot->spotter,date('Ymd', time()));
|
$dxcc=$this->dxcc_lookup($singlespot->spotter,date('Ymd', time()));
|
||||||
$singlespot->dxcc_spotter=$dxcc;
|
$singlespot->dxcc_spotter=$dxcc;
|
||||||
|
if ($de != '') {
|
||||||
|
if ($de == $dxcc['cont']) {
|
||||||
array_push($spotsout,$singlespot);
|
array_push($spotsout,$singlespot);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
array_push($spotsout,$singlespot);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ($spotsout);
|
return ($spotsout);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用