aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-22 20:03:09 -0700
committerFriendika <info@friendika.com>2011-09-22 20:03:09 -0700
commita2b2318106be9b133a7265697dc8776bcc248839 (patch)
tree3d2298914b8af88d6db4e7fbfe3790cbec6f13f0
parentfda9e6f2527bbc2156ad3283f3ad0d94ae8226e1 (diff)
downloadvolse-hubzilla-a2b2318106be9b133a7265697dc8776bcc248839.tar.gz
volse-hubzilla-a2b2318106be9b133a7265697dc8776bcc248839.tar.bz2
volse-hubzilla-a2b2318106be9b133a7265697dc8776bcc248839.zip
provide permission error vs "not found" for protected photos
-rw-r--r--mod/photos.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 424cc17b7..7141919b0 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -984,7 +984,15 @@ function photos_content(&$a) {
);
if(! count($ph)) {
- notice( t('Photo not available') . EOL );
+ $ph = q("SELECT `id` FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'
+ LIMIT 1",
+ intval($owner_uid),
+ dbesc($datum)
+ );
+ if(count($ph))
+ notice( t('Permission denied. Access to this item may be restricted.'));
+ else
+ notice( t('Photo not available') . EOL );
return;
}