diff options
author | Andrew Dolgov <[email protected]> | 2018-10-19 13:40:46 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-10-19 13:40:46 +0300 |
commit | fb7a24aca2e2b3719ea808b924c71594d84bbf4e (patch) | |
tree | 9ae0554bb1286c23e6ee1d6b1c9ba0573f41dcc6 /index.php | |
parent | ff872c4a89ca973cd9c7c83dc57c345cc3ee07e0 (diff) |
index: add image timestamp to cover URL
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -222,7 +222,14 @@ while ($line = $sth->fetch()) { ++$rows; - $cover_link = "backend.php?" . http_build_query(["op" => "cover", "id" => $line["id"]]); + $cover_filename = BOOKS_DIR . "/" . $line["path"] . "/" . "cover.jpg"; + + if (file_exists($cover_filename)) + $cover_mtime = filemtime($cover_filename); + else + $cover_mtime = 0; + + $cover_link = "backend.php?" . http_build_query(["op" => "cover", "id" => $line["id"], "ts" => $cover_mtime]); $author_link = "?" . http_build_query(["query" => $line["author_sort"]]); $in_progress = false; |