From 1cf228c258ba8a8950b1a55bc25b93768bf50184 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 28 Mar 2019 21:00:23 +0000 Subject: [PATCH] A bit more progress on delete attachment. --- WEB-INF/lib/ttFileHelper.class.php | 7 ++++--- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WEB-INF/lib/ttFileHelper.class.php b/WEB-INF/lib/ttFileHelper.class.php index d5815f4c..6a799ad8 100644 --- a/WEB-INF/lib/ttFileHelper.class.php +++ b/WEB-INF/lib/ttFileHelper.class.php @@ -44,6 +44,7 @@ class ttFileHelper { $this->storage_uri = FILE_STORAGE_URI; $this->register_uri = $this->storage_uri.'register'; $this->putfile_uri = $this->storage_uri.'putfile'; + $this->deletefile_uri = $this->storage_uri.'deletefile'; $this->getfile_uri = $this->storage_uri.'getfile'; $this->checkSiteRegistration(); } @@ -213,8 +214,8 @@ class ttFileHelper { 'user_id' => urlencode($fields['user_id']), // May be null. 'user_key' => urlencode($fields['user_key']), // May be null. 'file_id' => urlencode($fields['remote_id']), - 'file_key' => urlencode($fields['file_key']) - ); + 'file_key' => urlencode($fields['file_key']), + 'file_name' => urlencode($fields['file_name'])); // url-ify the data for the POST. foreach($curl_fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } @@ -224,7 +225,7 @@ class ttFileHelper { $ch = curl_init(); // Set the url, number of POST vars, POST data. - curl_setopt($ch, CURLOPT_URL, $this->putfile_uri); + curl_setopt($ch, CURLOPT_URL, $this->deletefile_uri); curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7e19867a..c62240bd 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.61.4893 | Copyright © Anuko | +  Anuko Time Tracker 1.18.61.4894 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1