Stop view.php from returning data of private photos
This commit is contained in:
parent
eacb8aeba3
commit
585bbb72ea
@ -56,6 +56,9 @@ function getGraphHeader($database, $photoID) {
|
||||
|
||||
if (!isset($database, $photoID)) return false;
|
||||
|
||||
$photo = new Photo($database, null, null, $photoID);
|
||||
if ($photo->getPublic('')===false) return false;
|
||||
|
||||
$query = Database::prepare($database, "SELECT title, description, url, medium FROM ? WHERE id = '?'", array(LYCHEE_TABLE_PHOTOS, $photoID));
|
||||
$result = $database->query($query);
|
||||
$row = $result->fetch_object();
|
||||
|
Loading…
Reference in New Issue
Block a user