mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-10-13 12:00:59 +02:00
Merge branch 'master' of git.fakecake.org:tt-rss
This commit is contained in:
commit
04ad631a08
6
classes/handler/public.php
Normal file → Executable file
6
classes/handler/public.php
Normal file → Executable file
@ -934,17 +934,17 @@ class Handler_Public extends Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cached_url() {
|
function cached_url() {
|
||||||
@$hash = basename($_GET['hash']);
|
@$req_filename = basename($_GET['hash']);
|
||||||
|
|
||||||
// we don't need an extension to find the file, hash is a complete URL
|
// we don't need an extension to find the file, hash is a complete URL
|
||||||
$hash = preg_replace("/\.[^\.]*$/", "", $hash);
|
$hash = preg_replace("/\.[^\.]*$/", "", $req_filename);
|
||||||
|
|
||||||
if ($hash) {
|
if ($hash) {
|
||||||
|
|
||||||
$filename = CACHE_DIR . '/images/' . $hash;
|
$filename = CACHE_DIR . '/images/' . $hash;
|
||||||
|
|
||||||
if (file_exists($filename)) {
|
if (file_exists($filename)) {
|
||||||
header("Content-Disposition: inline; filename=\"$hash\"");
|
header("Content-Disposition: inline; filename=\"$req_filename\"");
|
||||||
|
|
||||||
send_local_file($filename);
|
send_local_file($filename);
|
||||||
|
|
||||||
|
@ -1239,9 +1239,11 @@ class RSSUtils {
|
|||||||
|
|
||||||
$local_filename = CACHE_DIR . "/images/" . sha1($src);
|
$local_filename = CACHE_DIR . "/images/" . sha1($src);
|
||||||
|
|
||||||
if ($debug) _debug("cache_media: downloading: $src to $local_filename");
|
if ($debug) _debug("cache_media: checking $src");
|
||||||
|
|
||||||
if (!file_exists($local_filename)) {
|
if (!file_exists($local_filename)) {
|
||||||
|
if ($debug) _debug("cache_media: downloading: $src to $local_filename");
|
||||||
|
|
||||||
$file_content = fetch_file_contents($src);
|
$file_content = fetch_file_contents($src);
|
||||||
|
|
||||||
if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) {
|
if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) {
|
||||||
|
@ -24,12 +24,6 @@
|
|||||||
// You need to set this option correctly otherwise several features
|
// You need to set this option correctly otherwise several features
|
||||||
// including PUSH, bookmarklets and browser integration will not work properly.
|
// including PUSH, bookmarklets and browser integration will not work properly.
|
||||||
|
|
||||||
// Key used for encryption of passwords for password-protected feeds
|
|
||||||
// in the database. A string of 24 random characters. If left blank, encryption
|
|
||||||
// is not used. Requires mcrypt functions.
|
|
||||||
// Warning: changing this key will make your stored feed passwords impossible
|
|
||||||
// to decrypt.
|
|
||||||
|
|
||||||
define('SINGLE_USER_MODE', false);
|
define('SINGLE_USER_MODE', false);
|
||||||
// Operate in single user mode, disables all functionality related to
|
// Operate in single user mode, disables all functionality related to
|
||||||
// multiple users and authentication. Enabling this assumes you have
|
// multiple users and authentication. Enabling this assumes you have
|
||||||
|
File diff suppressed because one or more lines are too long
@ -72,8 +72,8 @@ body.ttrss_zoom {
|
|||||||
line-height : 1.5;
|
line-height : 1.5;
|
||||||
padding : 10px;
|
padding : 10px;
|
||||||
|
|
||||||
img {
|
img, video {
|
||||||
max-width : 730px;
|
max-width : 760px;
|
||||||
height : auto;
|
height : auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2574,6 +2574,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$mimetype = mime_content_type($filename);
|
$mimetype = mime_content_type($filename);
|
||||||
|
|
||||||
|
// this is hardly ideal but 1) only media is cached in images/ and 2) seemingly only mp4
|
||||||
|
// video files are detected as octet-stream by mime_content_type()
|
||||||
|
|
||||||
|
if ($mimetype == "application/octet-stream")
|
||||||
|
$mimetype = "video/mp4";
|
||||||
|
|
||||||
header("Content-type: $mimetype");
|
header("Content-type: $mimetype");
|
||||||
|
|
||||||
$stamp = gmdate("D, d M Y H:i:s", filemtime($filename)) . " GMT";
|
$stamp = gmdate("D, d M Y H:i:s", filemtime($filename)) . " GMT";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user