Files
FreshRSS/app/views/importExport/sqlite.phtml
Alexandre Alapetite 7a5ce0fe20 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
2024-10-23 21:55:52 +02:00

10 lines
453 B
PHTML

<?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);