Stop view.php from returning data of private photos

This commit is contained in:
Tobias Reich 2015-04-13 21:08:26 +02:00
parent eacb8aeba3
commit 585bbb72ea

View File

@ -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();