aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-24 19:55:50 +0000
committerMario <mario@mariovavti.com>2021-01-24 19:55:50 +0000
commite486442eb1fdda0c4efa7eafc6d876b3c2c4b0ea (patch)
tree6069feeaca13ff6369a8fead9e047f2471cf3a04 /include
parent2035828042e50f2c23f55d80b19fb898b170e6e5 (diff)
parent6b0c61ac6bf45993f5d89b976c4d11c7e287aa38 (diff)
downloadvolse-hubzilla-e486442eb1fdda0c4efa7eafc6d876b3c2c4b0ea.tar.gz
volse-hubzilla-e486442eb1fdda0c4efa7eafc6d876b3c2c4b0ea.tar.bz2
volse-hubzilla-e486442eb1fdda0c4efa7eafc6d876b3c2c4b0ea.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include')
-rw-r--r--include/photo/photo_driver.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php
index f61919eea..1ce2fd6e3 100644
--- a/include/photo/photo_driver.php
+++ b/include/photo/photo_driver.php
@@ -401,8 +401,17 @@ function import_channel_photo($photo, $type, $aid, $uid) {
logger('Importing channel photo for ' . $uid, LOGGER_DEBUG);
+ $r = q("SELECT resource_id FROM photo WHERE uid = %d AND photo_usage = %d AND imgscale = %d",
+ intval($uid),
+ intval(PHOTO_PROFILE),
+ intval(PHOTO_RES_PROFILE_300)
+ );
+ if ($r)
+ $hash = $r[0]['resource_id'];
+ else
+ $hash = photo_new_resource();
+
$photo_failure = false;
- $hash = photo_new_resource();
$filename = $hash;
$img = photo_factory($photo, $type);