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:
parent
31cbc80981
commit
88d25f977a
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue