Added "Call already worked" to internal API
这个提交包含在:
父节点
a2304a8fe5
当前提交
a5c6a5ce9d
共有 1 个文件被更改,包括 14 次插入 和 10 次删除
|
|
@ -3997,6 +3997,8 @@ class Logbook_model extends CI_Model {
|
||||||
$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/';
|
||||||
|
$CI->load->model('logbooks_model');
|
||||||
|
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||||
|
|
||||||
// CURL Functions
|
// CURL Functions
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
|
@ -4010,7 +4012,7 @@ class Logbook_model extends CI_Model {
|
||||||
|
|
||||||
// Create JSON object
|
// Create JSON object
|
||||||
if (strlen($jsonraw)>20) {
|
if (strlen($jsonraw)>20) {
|
||||||
$spotsout=[];
|
$spotsout=[];
|
||||||
foreach($json as $singlespot){
|
foreach($json as $singlespot){
|
||||||
$spotband = $CI->frequency->GetBand($singlespot->frequency*1000);
|
$spotband = $CI->frequency->GetBand($singlespot->frequency*1000);
|
||||||
$singlespot->band=$spotband;
|
$singlespot->band=$spotband;
|
||||||
|
|
@ -4023,15 +4025,17 @@ class Logbook_model extends CI_Model {
|
||||||
$minutes += $spotage->i;
|
$minutes += $spotage->i;
|
||||||
$singlespot->age=$minutes;
|
$singlespot->age=$minutes;
|
||||||
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 != '') {
|
||||||
if ($de == $dxcc['cont']) {
|
if ($de == $dxcc['cont']) {
|
||||||
array_push($spotsout,$singlespot);
|
$singlespot->worked_call = ($this->check_if_callsign_worked_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) == 1);
|
||||||
}
|
array_push($spotsout,$singlespot);
|
||||||
} else {
|
}
|
||||||
array_push($spotsout,$singlespot);
|
} else {
|
||||||
}
|
$singlespot->worked_call = ($this->check_if_callsign_worked_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) == 1);
|
||||||
|
array_push($spotsout,$singlespot);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ($spotsout);
|
return ($spotsout);
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用