]> git.mxchange.org Git - friendica.git/commitdiff
provide permission error vs "not found" for protected photos
authorFriendika <info@friendika.com>
Fri, 23 Sep 2011 03:03:09 +0000 (20:03 -0700)
committerFriendika <info@friendika.com>
Fri, 23 Sep 2011 03:03:09 +0000 (20:03 -0700)
mod/photos.php

index 424cc17b741150dd52d1ba7dd2092d32c63662fb..7141919b0f859e259cde032ac7c1ee0a5bbd85ee 100644 (file)
@@ -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;
                }