From 88d25f977a078dd3e5dfb7d0461cf231ff64358f Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Wed, 5 Sep 2018 14:12:56 +0200 Subject: [PATCH] fix lockview for photos - use the private field only for items because other tables than the item table don't have the private field --- mod/lockview.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/lockview.php b/mod/lockview.php index 893764c4d..7617d6f73 100644 --- a/mod/lockview.php +++ b/mod/lockview.php @@ -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); }