fix lockview for photos

- use the private field only for items because other tables than the item table don't have the private field
pull/5725/head
rabuzarus 2018-09-05 14:12:56 +02:00
parent 31cbc80981
commit 88d25f977a
1 changed files with 2 additions and 1 deletions

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);
}