mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 07:05: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user