[ADIF Backup] Added so that ADIF can be backed up with cron and api key

This commit is contained in:
Andreas
2023-05-01 15:25:30 +02:00
parent cb71e0961f
commit b45cfda3eb
2 changed files with 18 additions and 6 deletions

View File

@@ -20,14 +20,14 @@ class Backup extends CI_Controller {
}
/* Gets all QSOs and Dumps them to logbook.adi */
public function adif(){
public function adif($key){
$this->load->helper('file');
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
$this->load->model('adif_data');
$data['qsos'] = $this->adif_data->export_all();
$data['qsos'] = $this->adif_data->export_all($key);
if ( ! write_file('backup/logbook.adi', $this->load->view('backup/exportall', $data, true)))
{