provide permission error vs "not found" for protected photos
This commit is contained in:
parent
fda9e6f252
commit
a2b2318106
|
@ -984,6 +984,14 @@ function photos_content(&$a) {
|
||||||
);
|
);
|
||||||
|
|
||||||
if(! count($ph)) {
|
if(! count($ph)) {
|
||||||
|
$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 );
|
notice( t('Photo not available') . EOL );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue