mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
fixed a bug in simplefle and added cache clearing
This commit is contained in:
@@ -87,11 +87,11 @@ class SimpleFLE extends CI_Controller {
|
||||
$one_result = $this->logbook_model->import($qso, $qso['station_id']);
|
||||
|
||||
// if the returner is not empty we have an error and should log it
|
||||
if ($result != '' && strpos(json_encode($one_result), 'Duplicate for') == false) {
|
||||
log_message('error', 'SimpleFLE, save_qsos(); For QSO: ' . $qso['call'] . ' on ' . $qso['qso_date'] . ' Error: ' . json_encode($result));
|
||||
if (json_encode($result) != '[]' && strpos(json_encode($one_result), __("Duplicate for")) == false) {
|
||||
log_message('error', 'SimpleFLE, save_qsos(); For QSO: ' . $qso['call'] . ' on ' . $qso['qso_date'] . ' Error: ' . json_encode($one_result));
|
||||
}
|
||||
if (strpos(json_encode($one_result), 'Duplicate for') !== false) {
|
||||
log_message('debug', 'SimpleFLE, save_qsos(); For QSO: ' . $qso['call'] . ' on ' . $qso['qso_date'] . ' Warning: ' . json_encode($result));
|
||||
if (strpos(json_encode($one_result), __("Duplicate for")) !== false) {
|
||||
log_message('debug', 'SimpleFLE, save_qsos(); For QSO: ' . $qso['call'] . ' on ' . $qso['qso_date'] . ' Warning: ' . json_encode($one_result));
|
||||
}
|
||||
|
||||
if ($one_result != '') {
|
||||
@@ -99,6 +99,12 @@ class SimpleFLE extends CI_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
// Also clean up static map images
|
||||
if (!$this->load->is_loaded('staticmap_model')) {
|
||||
$this->load->model('staticmap_model');
|
||||
}
|
||||
$this->staticmap_model->remove_static_map_image($qso['station_id']);
|
||||
|
||||
if (empty($result)) {
|
||||
echo "success";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user