From 4d049741eff2b0fcfc0c33faaa54724e824fe4ed Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 5 Oct 2014 17:17:25 -0700 Subject: try and guess mimetype for openid profile photo --- mod/openid.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod') 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), -- cgit v1.2.3