mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Removed redundant duplicate check under search
This commit is contained in:
@@ -138,7 +138,7 @@ class Logbook extends CI_Controller {
|
||||
$return['dxcc'] = $this->dxcheck($callsign);
|
||||
|
||||
$lookupcall=$this->get_plaincall($callsign);
|
||||
|
||||
|
||||
$return['partial'] = $this->partial($lookupcall);
|
||||
|
||||
$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
|
||||
@@ -1012,39 +1012,6 @@ class Logbook extends CI_Controller {
|
||||
return $this->db->get();
|
||||
}
|
||||
|
||||
function search_duplicates($station_id) {
|
||||
$station_id = $this->security->xss_clean($station_id);
|
||||
|
||||
$this->load->model('user_model');
|
||||
|
||||
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
|
||||
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (!$logbooks_locations_array) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$location_list = "'".implode("','",$logbooks_locations_array)."'";
|
||||
|
||||
$sql = 'select count(*) as occurence, COL_CALL, COL_MODE, COL_SUBMODE, station_callsign, COL_SAT_NAME, COL_BAND, min(col_time_on) Mintime, max(col_time_on) Maxtime from ' . $this->config->item('table_name') .
|
||||
' join station_profile on ' . $this->config->item('table_name') . '.station_id = station_profile.station_id where ' . $this->config->item('table_name') .'.station_id in ('. $location_list . ')';
|
||||
|
||||
if ($station_id != 'All') {
|
||||
$sql .= ' and station_profile.station_id = ' . $station_id;
|
||||
}
|
||||
|
||||
$sql .= ' group by col_call, col_mode, COL_SUBMODE, STATION_CALLSIGN, col_band, COL_SAT_NAME having count(*) > 1 and timediff(maxtime, mintime) < 3000';
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
$data['qsos'] = $query;
|
||||
|
||||
$this->load->view('search/duplicates_result.php', $data);
|
||||
|
||||
}
|
||||
|
||||
function search_lotw_unconfirmed($station_id) {
|
||||
$station_id = $this->security->xss_clean($station_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user