Static Map API (#1098)

Added new Static Map Feature

---------

Co-authored-by: phl0 <github@florian-wolters.de>
This commit is contained in:
HB9HIL
2024-10-31 10:26:59 +01:00
committed by GitHub
parent bc76962f3a
commit 4fcfd667e2
37 changed files with 4628 additions and 72 deletions

View File

@@ -184,7 +184,7 @@ class adif extends CI_Controller {
$this->load->view('adif/import', $data);
$this->load->view('interface_assets/footer');
} else {
if ($this->stations->check_station_is_accessible($this->input->post('station_profile'))) {
if ($this->stations->check_station_is_accessible($this->input->post('station_profile', TRUE))) {
$contest=$this->security->xss_clean($this->input->post('contest')) ?? '';
$stopnow=false;
$fdata = array('upload_data' => $this->upload->data());
@@ -236,7 +236,7 @@ class adif extends CI_Controller {
};
$record=''; // free memory
try {
$custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markEqsl'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'));
$custom_errors = $this->logbook_model->import_bulk($alladif, $this->input->post('station_profile', TRUE), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markEqsl'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'));
} catch (Exception $e) {
log_message('error', 'Import error: '.$e->getMessage());
$data['page_title'] = __("ADIF Import failed!");
@@ -256,6 +256,12 @@ class adif extends CI_Controller {
$custom_errors=__("Station Profile not valid for User");
}
// Lets clean up static maps cache for this station
if (!$this->load->is_loaded('staticmap_model')) {
$this->load->model('staticmap_model');
}
$this->staticmap_model->remove_static_map_image($this->input->post('station_profile', TRUE));
log_message("Error","ADIF End");
$data['adif_errors'] = $custom_errors;
$data['skip_dupes'] = $this->input->post('skipDuplicate');