fix lockview for photos

- use the private field only for items because other tables than the item table don't have the private field
This commit is contained in:
rabuzarus 2018-09-05 14:12:56 +02:00
parent 31cbc80981
commit 88d25f977a

View file

@ -24,11 +24,12 @@ function lockview_content(App $a) {
if (!in_array($type, ['item','photo','event']))
killme();
$fields = ['uid', 'private', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid'];
$fields = ['uid', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid'];
$condition = ['id' => $item_id];
if ($type != 'item') {
$item = DBA::selectFirst($type, $fields, $condition);
} else {
$fields[] = 'private';
$item = Item::selectFirst($fields, $condition);
}