diff options
| author | 2024-10-23 21:55:52 +0200 | |
|---|---|---|
| committer | 2024-10-23 21:55:52 +0200 | |
| commit | 7a5ce0fe20d63746b7f5b435ba5eef0a9b7db2d6 (patch) | |
| tree | 090cff8c9852ecc4636feaa1c5a75304c23fad27 /app/views/importExport/sqlite.phtml | |
| parent | 60dd22d3b3916f5113954fc1472b1658c3c4245f (diff) | |
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
Diffstat (limited to 'app/views/importExport/sqlite.phtml')
| -rw-r--r-- | app/views/importExport/sqlite.phtml | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ +<?php +declare(strict_types=1); +/** @var FreshRSS_View $this */ +header('Content-Type: application/vnd.sqlite3'); +header('Content-Disposition: attachment; filename="' . basename($this->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); |
