- QSO create/edit check that station belongs to user

- QSO form only shows stations of user
pull/1256/head
Thomas Werzmirzowsky 2021-10-31 10:25:35 +01:00
rodzic 61b41df1d9
commit 6f39ce940f
2 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -30,7 +30,7 @@ class QSO extends CI_Controller {
$data['active_station_profile'] = $this->stations->find_active();
$data['notice'] = false;
$data['stations'] = $this->stations->all();
$data['stations'] = $this->stations->all_of_user();
$data['radios'] = $this->cat->radios();
$data['query'] = $this->logbook_model->last_custom('5');
$data['dxcc'] = $this->logbook_model->fetchDxcc();

Wyświetl plik

@ -462,6 +462,13 @@ class Logbook_model extends CI_Model {
$stationId = $this->input->post('station_profile');
$country = $entity['name'];
// be sure that station belongs to user
$CI =& get_instance();
$CI->load->model('Stations');
if (!$CI->Stations->check_station_is_accessible($stationId)) {
return;
}
$mode = $this->get_main_mode_if_submode($this->input->post('mode'));
if ($mode == null) {
$mode = $this->input->post('mode');