1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 05:25:56 +00:00

remove local file extensions and generalize some method names for cached media

file extensions may still be present in urls, but are ignored by the backend

MIGRATION (if you have any cached data worth keeping, not required):
in cache/images run "rename 's/\..*$//' *" i.e. strip file extensions
This commit is contained in:
Andrew Dolgov
2017-03-23 14:55:40 +03:00
parent 63f0ed3d9c
commit 41bead9baa
4 changed files with 19 additions and 19 deletions

View File

@@ -1046,9 +1046,12 @@ class Handler_Public extends Handler {
<?php
}
function cached_image() {
function cached_url() {
@$hash = basename($_GET['hash']);
// we don't need an extension to find the file, hash is a complete URL
$hash = preg_replace("/\.[^\.]*$/", "", $hash);
if ($hash) {
$filename = CACHE_DIR . '/images/' . $hash;