Merge pull request #1159 from AndreasK79/sota_station_logbooks

[SOTA Award] Updated code to support station logbooks
pull/1162/head
Peter Goodhall 2021-09-09 21:52:22 +01:00 zatwierdzone przez GitHub
commit d130940d48
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -6,18 +6,18 @@ class Sota extends CI_Model {
{ {
parent::__construct(); parent::__construct();
} }
function get_all() { function get_all() {
$CI =& get_instance(); $CI =& get_instance();
$CI->load->model('Stations'); $CI->load->model('logbooks_model');
$station_id = $CI->Stations->find_active(); $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->db->where("station_id", $station_id); $this->db->where_in("station_id", $logbooks_locations_array);
$this->db->order_by("COL_SOTA_REF", "ASC"); $this->db->order_by("COL_SOTA_REF", "ASC");
$this->db->where('COL_SOTA_REF !=', ''); $this->db->where('COL_SOTA_REF !=', '');
return $this->db->get($this->config->item('table_name')); return $this->db->get($this->config->item('table_name'));
} }
} }
?> ?>