aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photo.php
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2011-03-13 11:37:24 +0100
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2011-03-13 11:37:24 +0100
commita2ee5ebe427522228dc03dc81da11f348a399c4d (patch)
tree8bffe9c8c9abe370523816f7742e6e26364fa5b5 /mod/photo.php
parent8fea19dd38cf9c43bb6f6fa1a4f349555cbe90f8 (diff)
parenta912a0d3cae0ae9c873dcb5c45624a725bd2c2d6 (diff)
downloadvolse-hubzilla-a2ee5ebe427522228dc03dc81da11f348a399c4d.tar.gz
volse-hubzilla-a2ee5ebe427522228dc03dc81da11f348a399c4d.tar.bz2
volse-hubzilla-a2ee5ebe427522228dc03dc81da11f348a399c4d.zip
Merge branch 'master' of git://github.com/friendika/friendika
Conflicts: addon/twitter/twitter.php
Diffstat (limited to 'mod/photo.php')
-rw-r--r--mod/photo.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/mod/photo.php b/mod/photo.php
index 7f13d1cbf..2f8d180fd 100644
--- a/mod/photo.php
+++ b/mod/photo.php
@@ -108,6 +108,24 @@ function photo_init(&$a) {
if(count($r)) {
$data = $r[0]['data'];
}
+ else {
+
+ // Does the picture exist? It may be a remote person with no credentials,
+ // but who should otherwise be able to view it. Show a default image to let
+ // them know permissions was denied. It may be possible to view the image
+ // through an authenticated profile visit.
+ // There won't be many complete 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(count($r)) {
+ $data = file_get_contents('images/nosign.jpg');
+ }
+ }
}
}