kopia lustrzana https://github.com/magicbug/Cloudlog
return only qso with the exact qrz lookup
rodzic
00de7b43dd
commit
169fe65581
|
@ -136,14 +136,16 @@ class Logbook extends CI_Controller {
|
|||
|
||||
$return['dxcc'] = $this->dxcheck($callsign);
|
||||
$split_callsign=explode('/',$callsign);
|
||||
if (isset($split_callsign[1]) && ($split_callsign[1] != "")) { // Do we have "/" in Call?
|
||||
if (count($split_callsign)==1) { // case F4ANS --> return cel 0 //
|
||||
$lookupcall = $split_callsign[0];
|
||||
} else if (count($split_callsign)==3) { // case EA/F4ANS/P --> return cel 1 //
|
||||
$lookupcall = $split_callsign[1];
|
||||
} else { // case F4ANS/P --> return cel 0 OR case EA/F4ANS --> retunr 1 (normaly not exist) //
|
||||
if (strlen($split_callsign[1])>3) { // Last Element longer than 3 chars? Take that as call
|
||||
$lookupcall = $split_callsign[1];
|
||||
} else { // Last Element up to 3 Chars? Take first element as Call
|
||||
} else { // Last Element up to 3 Chars? Take first element as Call
|
||||
$lookupcall = $split_callsign[0];
|
||||
}
|
||||
} else {
|
||||
$lookupcall=$callsign;
|
||||
}
|
||||
|
||||
$return['partial'] = $this->partial($lookupcall);
|
||||
|
@ -257,7 +259,7 @@ class Logbook extends CI_Controller {
|
|||
return false;
|
||||
}
|
||||
|
||||
function worked_grid_before($gridsquare, $type, $band, $mode)
|
||||
function worked_grid_before($gridsquare, $type, $band, $mode)
|
||||
{
|
||||
if (strlen($gridsquare) < 4)
|
||||
return false;
|
||||
|
@ -707,7 +709,11 @@ function worked_grid_before($gridsquare, $type, $band, $mode)
|
|||
$this->db->where_in('station_profile.station_id', $logbooks_locations_array);
|
||||
$this->db->order_by(''.$this->config->item('table_name').'.COL_TIME_ON', "desc");
|
||||
|
||||
$this->db->like($this->config->item('table_name').'.COL_CALL', $id);
|
||||
$this->db->where($this->config->item('table_name').'.COL_CALL', $id);
|
||||
$this->db->or_like($this->config->item('table_name').'.COL_CALL', '/'.$id,'before');
|
||||
$this->db->or_like($this->config->item('table_name').'.COL_CALL', $id.'/','after');
|
||||
$this->db->or_like($this->config->item('table_name').'.COL_CALL', '/'.$id.'/');
|
||||
|
||||
$this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "desc");
|
||||
$this->db->limit(5);
|
||||
|
||||
|
@ -985,7 +991,7 @@ function worked_grid_before($gridsquare, $type, $band, $mode)
|
|||
if($data['callsign']['error'] == "Session does not exist or expired") {
|
||||
$hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
|
||||
$this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
|
||||
$data['callsign'] = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key'));
|
||||
$data['callsign'] = $this->hamqth->search($id, $this->session->userdata('hamqth_session_key'));
|
||||
}
|
||||
if (isset($data['callsign']['gridsquare'])) {
|
||||
$CI = &get_instance();
|
||||
|
|
Ładowanie…
Reference in New Issue