Bust cached dashboard images
This commit is contained in:
+4
-3
@@ -1957,8 +1957,9 @@ final class App
|
|||||||
|
|
||||||
$event['image_url'] = null;
|
$event['image_url'] = null;
|
||||||
$eventImage = trim((string) ($event['image'] ?? ''));
|
$eventImage = trim((string) ($event['image'] ?? ''));
|
||||||
if ($eventImage !== '' && is_file($this->dashboardMediaDirectory($username) . '/' . basename($eventImage))) {
|
$eventImagePath = $this->dashboardMediaDirectory($username) . '/' . basename($eventImage);
|
||||||
$event['image_url'] = '/event-image?date=' . rawurlencode($date) . '&id=' . rawurlencode((string) ($event['id'] ?? ''));
|
if ($eventImage !== '' && is_file($eventImagePath)) {
|
||||||
|
$event['image_url'] = '/event-image?date=' . rawurlencode($date) . '&id=' . rawurlencode((string) ($event['id'] ?? '')) . '&v=' . rawurlencode((string) filemtime($eventImagePath));
|
||||||
}
|
}
|
||||||
$events[] = $event;
|
$events[] = $event;
|
||||||
}
|
}
|
||||||
@@ -1970,7 +1971,7 @@ final class App
|
|||||||
|
|
||||||
$path = $this->dashboardMediaDirectory($username) . '/' . basename($fileName);
|
$path = $this->dashboardMediaDirectory($username) . '/' . basename($fileName);
|
||||||
if (is_file($path)) {
|
if (is_file($path)) {
|
||||||
$entry['background_image_url'] = '/day-image?date=' . rawurlencode($date);
|
$entry['background_image_url'] = '/day-image?date=' . rawurlencode($date) . '&v=' . rawurlencode((string) filemtime($path));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $entry;
|
return $entry;
|
||||||
|
|||||||
Reference in New Issue
Block a user