From: rabuzarus Date: Wed, 5 Sep 2018 12:12:56 +0000 (+0200) Subject: fix lockview for photos X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=88d25f977a078dd3e5dfb7d0461cf231ff64358f;p=friendica.git fix lockview for photos - use the private field only for items because other tables than the item table don't have the private field --- diff --git a/mod/lockview.php b/mod/lockview.php index 893764c4d9..7617d6f736 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); }