From 7a5ce0fe20d63746b7f5b435ba5eef0a9b7db2d6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 23 Oct 2024 21:55:52 +0200 Subject: Web export SQLite (#6931) * Web export SQLite https://github.com/FreshRSS/FreshRSS/discussions/6930 * Implement download * Fix operator precedence * Set Last-Modified * Sort by time, newest first * Fix Last-Modified * Use DateTimeInterface::RFC7231 * Add not_applicable message --- app/views/importExport/index.phtml | 31 ++++++++++++++++++++++++++++++- app/views/importExport/sqlite.phtml | 9 +++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 app/views/importExport/sqlite.phtml (limited to 'app/views') diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml index dfcdc8404..1f32acfcb 100644 --- a/app/views/importExport/index.phtml +++ b/app/views/importExport/index.phtml @@ -65,7 +65,7 @@ $select_args = ' size="' . min(10, count($this->feeds)) . '" multiple="multiple"'; } ?> - > ' ?> feeds as $feed) { ?> @@ -81,4 +81,33 @@ + +

+ sqliteArchives ?? []) === 0): ?> +

+ +

+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+ diff --git a/app/views/importExport/sqlite.phtml b/app/views/importExport/sqlite.phtml new file mode 100644 index 000000000..8c9adcab1 --- /dev/null +++ b/app/views/importExport/sqlite.phtml @@ -0,0 +1,9 @@ +sqlitePath) . '"'); +header('Cache-Control: private, no-store, max-age=0'); +header('Last-Modified: ' . gmdate(DateTimeInterface::RFC7231, @filemtime($this->sqlitePath) ?: 0)); +header('Content-Length: ' . (@filesize($this->sqlitePath) ?: 0)); +readfile($this->sqlitePath); -- cgit v1.2.3