From be7e732391ff50d5c9a0fdc7a653d6bba8b667bd Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 12 Nov 2013 19:25:23 -0800 Subject: fix forbidden photos and vcard photo template --- mod/photo.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/photo.php b/mod/photo.php index fffc15e53..3e86b02ba 100644 --- a/mod/photo.php +++ b/mod/photo.php @@ -112,17 +112,18 @@ function photo_init(&$a) { // There won't be many completely unauthorised people seeing this because // they won't have the photo link, so there's a reasonable chance that the person // might be able to obtain permission to view it. - + $r = q("SELECT * FROM `photo` WHERE `resource_id` = '%s' AND `scale` = %d LIMIT 1", dbesc($photo), intval($resolution) ); + if($r) { - logger('mod_photo: forbidden. ' . $a->query_string()); + logger('mod_photo: forbidden. ' . $a->query_string); $observer = $a->get_observer(); logger('mod_photo: observer = ' . (($observer) ? $observer['xchan_addr'] : '(not authenticated)')); $data = file_get_contents('images/nosign.png'); - $mimetype = 'image/jpeg'; + $mimetype = 'image/png'; $prvcachecontrol = true; } } -- cgit v1.2.3