Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions www/coverart
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,17 @@ if ($targVsn) {
if (isset($deltas['title']))
$title = $deltas['title'];

$pagevsn = (int)$rec['pagevsn'];

// Hack to assist local development, which uses production as an image source.
// If the target version is above what the server knows about, return the latest version.
if ($i == 0 && $pagevsn < $targVsn) {
$foundvsn = true;
break;
}

// stop if this is the version we're looking for
if ((int)$rec['pagevsn'] == $targVsn)
if ($pagevsn == $targVsn)
{
$foundvsn = true;
break;
Expand All @@ -133,4 +142,4 @@ if (isset($_REQUEST['version'])) {
}

// send it
sendImage($imgdata, $fmt, $thumbnail);
sendImage($imgdata, $fmt, $thumbnail);