aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo/photo_driver.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-24 11:16:03 +0000
committerMario <mario@mariovavti.com>2021-03-24 12:18:32 +0100
commit4964a32c55e05e86242ec430eb89d018f2b9639f (patch)
tree8b7b763ff32b06230f8ee602a256a4c7b780e063 /include/photo/photo_driver.php
parent6d5f98072df1c2937723d2accd099f95a9d773a4 (diff)
downloadvolse-hubzilla-4964a32c55e05e86242ec430eb89d018f2b9639f.tar.gz
volse-hubzilla-4964a32c55e05e86242ec430eb89d018f2b9639f.tar.bz2
volse-hubzilla-4964a32c55e05e86242ec430eb89d018f2b9639f.zip
Revalidate imported profile photo on each request (patch provided by Max)
(cherry picked from commit 3d4ad94dccd3f3b0ee7b77408ca1c293b30fd922)
Diffstat (limited to 'include/photo/photo_driver.php')
-rw-r--r--include/photo/photo_driver.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index 8de5185af..256369c69 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -239,7 +239,7 @@ function import_xchan_photo($photo, $xchan, $thing = false, $force = false) {
if($force || empty($modified))
$result = z_fetch_url($photo, true);
- elseif($exp - 60 < time()) {
+ else {
$h = [];
$h[] = "If-Modified-Since: " . gmdate("D, d M Y H:i:s", $exp) . " GMT";
if(! empty($etag))
@@ -247,6 +247,7 @@ function import_xchan_photo($photo, $xchan, $thing = false, $force = false) {
$result = z_fetch_url($photo, true, 0, [ 'headers' => $h ]);
}
+
if(isset($result)) {
$hdrs = [];
$h = explode("\n", $result['header']);