Can not make albums public (#80)

This commit is contained in:
Tobias Reich 2014-02-11 12:36:06 +01:00
parent 759ce874e7
commit 7c0c000880

View File

@ -298,7 +298,7 @@ function setAlbumPublic($albumID, $password) {
$result = $database->query("SELECT public FROM lychee_albums WHERE id = '$albumID';"); $result = $database->query("SELECT public FROM lychee_albums WHERE id = '$albumID';");
$row = $result->fetch_object(); $row = $result->fetch_object();
$public = ($row->public===0 ? 1 : 0); $public = ($row->public=='0' ? 1 : 0);
$result = $database->query("UPDATE lychee_albums SET public = '$public', password = NULL WHERE id = '$albumID';"); $result = $database->query("UPDATE lychee_albums SET public = '$public', password = NULL WHERE id = '$albumID';");
if (!$result) return false; if (!$result) return false;