aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-12 19:25:23 -0800
committerfriendica <info@friendica.com>2013-11-12 19:25:23 -0800
commitbe7e732391ff50d5c9a0fdc7a653d6bba8b667bd (patch)
tree9338cb027f0984cd6d2262f6a73f4e3f09c0afb8
parentc803f620e6ab69a2d28c122e2754d97f0fd6e0b3 (diff)
downloadvolse-hubzilla-be7e732391ff50d5c9a0fdc7a653d6bba8b667bd.tar.gz
volse-hubzilla-be7e732391ff50d5c9a0fdc7a653d6bba8b667bd.tar.bz2
volse-hubzilla-be7e732391ff50d5c9a0fdc7a653d6bba8b667bd.zip
fix forbidden photos and vcard photo template
-rw-r--r--mod/photo.php7
-rwxr-xr-xview/tpl/xchan_vcard.tpl2
2 files changed, 5 insertions, 4 deletions
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;
}
}
diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl
index ac2eaf7ae..f5c60cff4 100755
--- a/view/tpl/xchan_vcard.tpl
+++ b/view/tpl/xchan_vcard.tpl
@@ -1,6 +1,6 @@
<div class="vcard">
<div class="fn">{{$name}}</div>
-<div id="profile-photo-wrapper"><img class="vcard-photo photo" src="{{$photo}}" alt="name" /></div>
+<div id="profile-photo-wrapper"><img class="vcard-photo photo" src="{{$photo}}" alt="{{name}}" /></div>
</div>