From 62ed493b6c07b218cc141e63547ce4dcd04881a2 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 19 Jun 2019 16:51:46 +0100 Subject: [PATCH] Gave clublog files a random id --- application/controllers/Clublog.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/controllers/Clublog.php b/application/controllers/Clublog.php index da9a97b1..ad859f0b 100644 --- a/application/controllers/Clublog.php +++ b/application/controllers/Clublog.php @@ -32,11 +32,13 @@ class Clublog extends CI_Controller { // Create ADIF File of contacts not uploaded to Clublog $string = $this->load->view('adif/data/clublog', $data, TRUE); - if ( ! write_file('uploads/clublog.adi', $string)) { + $ranid = uniqid(); + if ( ! write_file('uploads/clublog'.$ranid.'.adi', $string)) { echo 'Unable to write the file - Make the folder Upload folder has write permissions.'; } else { - $file_info = get_file_info('uploads/clublog.adi'); + + $file_info = get_file_info('uploads/clublog'.$ranid.'.adi'); // initialise the curl request $request = curl_init('https://clublog.org/putlogs.php');