Marien Fressinaud
15505a0377
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
2020-06-13 19:36:24 +02:00
Alexandre Alapetite
7a5236de3f
Take advantage of PHP 5.4+ short echo ( #2585 )
...
* Take advantage of PHP 5.4+ short echo
https://php.net/migration54.new-features thanks to
https://github.com/FreshRSS/FreshRSS/pull/2495
Use `<?= ?>` instead of `<?php echo; ?>`
10kB of code saved :-)
Done with regular expression:
```
<\?php echo (.+?);? *\?>
<?= \1 ?>
```
* Try Travis fix
https://github.com/squizlabs/PHP_CodeSniffer/issues/2045#issuecomment-395238272
2019-10-23 11:18:20 +02:00
Alexandre Alapetite
743c1b740b
Export labels ( #2217 )
...
* Export labels
https://github.com/FreshRSS/FreshRSS/issues/2196
* Small fixes
* Backport code from 1.14.0
4888f919f1
* More fixes
2019-01-16 22:26:43 +01:00
Alexandre Alapetite
fcb9280fc8
CLI export
...
ZIP export, OPML export.
Corrected height of feeds select in Pafat theme.
https://github.com/FreshRSS/FreshRSS/pull/1338
https://github.com/FreshRSS/FreshRSS/issues/1039
https://github.com/FreshRSS/FreshRSS/issues/1277
2016-10-23 13:37:48 +02:00
Alexandre Alapetite
e6fd34bdda
CSRF token, update HTTP Referrer policy to same-origin
...
https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer
https://github.com/FreshRSS/FreshRSS/issues/570
https://github.com/FreshRSS/FreshRSS/issues/955
https://github.com/FreshRSS/FreshRSS/issues/1198
https://github.com/FreshRSS/FreshRSS/issues/565
https://github.com/FreshRSS/FreshRSS/issues/554
2016-08-13 17:49:31 +02:00
Marien Fressinaud
0ee16a7d6a
Fix i18n for import/export
2014-12-11 17:46:05 +01:00
Marien Fressinaud
1eef789306
Reorganize subscription management code
...
There is still a lot of work to do. Some links are broken.
See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-10-01 11:27:41 +02:00
Marien Fressinaud
94570aaf5a
Improve system import/export
...
Miss checking presence of zip extension during import
See https://github.com/marienfressinaud/FreshRSS/issues/494
2014-08-11 19:02:27 +02:00
Marien Fressinaud
5490a190da
Fix import/export view
...
Some bugs introduce because I was tired surely ;)
2014-08-09 15:01:22 +02:00
Marien Fressinaud
773d73314b
Fix typo
...
Oops? :)
2014-08-09 00:35:06 +02:00
Marien Fressinaud
d007b22beb
Change view import/export if no zip extension
...
Show a select with only one choice is there is no zip extension on
the server.
Fix typo.
See https://github.com/marienfressinaud/FreshRSS/issues/494
2014-08-09 00:23:22 +02:00
Marien Fressinaud
84826491a3
Improve export function
...
If there is only one file to export, we don't need of a .zip archive.
So it is exported as a simple file (.json or .opml)
See https://github.com/marienfressinaud/FreshRSS/issues/494
2014-08-08 23:53:16 +02:00
Marien Fressinaud
7676a197a4
Fix typo + improve detection OPML file
2014-03-29 19:10:18 +01:00
Marien Fressinaud
05cc97a8f4
Export form is not displayed if there is nothing to export
2014-03-28 18:44:52 +01:00
Marien Fressinaud
9d87f2f0aa
Export is fully implemented
...
- Export list of feeds (OPML)
- Export list of favourites (JSON)
- Export list of articles per feed (JSON)
2014-03-27 20:36:51 +01:00
Marien Fressinaud
d1c5db7461
New version to export articles + opml
...
It does not work yet! A lot of work has still to be done.
Next versions should fix TODOs
- OPML export works fine but can be improved
- a framework has been created for articles export
2014-03-18 22:42:47 +01:00
Marien Fressinaud
dbdda1d0c1
Move import/export operations into an independant class
...
- import and export are now two methods of importExportController
- "opml" has been removed from the title
2014-03-16 19:34:04 +01:00