mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-31 20:51:30 -04:00
* 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
10 lines
453 B
PHTML
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);
|