From ee8c83bbd8cc5fe8f4d68e5c60f3af3cdc655e72 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 4 Feb 2016 17:57:36 +0100 Subject: [PATCH] Some small fixes. --- app/Export/Collector/AttachmentCollector.php | 3 ++- app/Http/Controllers/ExportController.php | 10 ++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/Export/Collector/AttachmentCollector.php b/app/Export/Collector/AttachmentCollector.php index 93bc425909..56dc9704d0 100644 --- a/app/Export/Collector/AttachmentCollector.php +++ b/app/Export/Collector/AttachmentCollector.php @@ -45,7 +45,8 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface if (file_exists($originalFile)) { Log::debug('Stored 1 attachment'); $decrypted = Crypt::decrypt(file_get_contents($originalFile)); - $newFile = storage_path('export') . DIRECTORY_SEPARATOR . $this->job->key . '-Attachment nr. ' . $attachment->id . ' - ' . $attachment->filename; + $newFile = storage_path('export') . DIRECTORY_SEPARATOR . $this->job->key . '-Attachment nr. ' . $attachment->id . ' - ' + . $attachment->filename; file_put_contents($newFile, $decrypted); $this->getFiles()->push($newFile); } diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php index 9c8c1e64c7..01ee98ebcf 100644 --- a/app/Http/Controllers/ExportController.php +++ b/app/Http/Controllers/ExportController.php @@ -88,17 +88,11 @@ class ExportController extends Controller $accounts = $repository->getAccounts(['Default account', 'Asset account']); $formats = array_keys(Config::get('firefly.export_formats')); $defaultFormat = Preferences::get('export_format', Config::get('firefly.default_export_format'))->data; - //$first = session('first')->format('Y-m-d'); - $first = Carbon::create()->startOfYear()->format('Y-m-d'); - $today = Carbon::create()->format('Y-m-d'); + $first = session('first')->format('Y-m-d'); + $today = Carbon::create()->format('Y-m-d'); return view('export.index', compact('accounts', 'job', 'formats', 'defaultFormat', 'first', 'today')); - // select date range - // format - // select accounts - // include attachments - // include uploaded CSV files (if any) } /**