aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-10-05 17:17:25 -0700
committerfriendica <info@friendica.com>2014-10-05 17:17:25 -0700
commit4d049741eff2b0fcfc0c33faaa54724e824fe4ed (patch)
tree614e7cb6a49538014d69d3b3ee1f8d83668cc168
parentbf6c72fc0ed943879f573710d88c12e402a90f6f (diff)
downloadvolse-hubzilla-4d049741eff2b0fcfc0c33faaa54724e824fe4ed.tar.gz
volse-hubzilla-4d049741eff2b0fcfc0c33faaa54724e824fe4ed.tar.bz2
volse-hubzilla-4d049741eff2b0fcfc0c33faaa54724e824fe4ed.zip
try and guess mimetype for openid profile photo
-rw-r--r--mod/openid.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/mod/openid.php b/mod/openid.php
index 2112e0af4..ce7fe22ba 100644
--- a/mod/openid.php
+++ b/mod/openid.php
@@ -127,6 +127,8 @@ function openid_content(&$a) {
elseif($photo_other)
$pphoto = $photo_other;
+ $mimetype = guess_image_type($pphoto);
+
$x = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_mimetype,
xchan_photo_l, xchan_addr, xchan_url, xchan_connurl, xchan_follow, xchan_connpage, xchan_name, xchan_network, xchan_photo_date,
xchan_name_date, xchan_flags)
@@ -135,7 +137,7 @@ function openid_content(&$a) {
dbesc(''),
dbesc(''),
dbesc(''),
- dbesc('image/jpeg'),
+ dbesc($mimetype),
dbesc($pphoto),
dbesc($addr),
dbesc($url),