From 15505a03779326f9497644e9827477cdcc26c2d2 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 13 Jun 2020 19:36:24 +0200 Subject: tec: Refactor the export feature (#3045) Even if the issue #3035 seemed pretty simple at a first glance, it was more complicated than I expected. Because we send CSP headers AFTER running the controller actions, it means we can't "echo" any content from the controller. It's in fact a good practice, but it was easier at the time we developed the feature. To fix that, the only thing I had to do was to move the `print()` and `readfile()` function into the view. The problem was that we needed to output the content from the CLI too. Then, things became more complicated. I decided to extract the export-related methods in a `FreshRSS_Export_Service` class, in order to use it from both the controller and the CLI. It was an opportunity to refactor the whole feature in order to make it a bit more linear and easy to read. Reference: https://github.com/FreshRSS/FreshRSS/issues/3035 --- app/views/importExport/export.phtml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views/importExport') diff --git a/app/views/importExport/export.phtml b/app/views/importExport/export.phtml index e69de29bb..399e72d00 100644 --- a/app/views/importExport/export.phtml +++ b/app/views/importExport/export.phtml @@ -0,0 +1 @@ +content ?> -- cgit v1.2.3