From d019ef57d2f994f449bb48915cdbee27a2d95672 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 15 Feb 2022 15:44:44 +0000 Subject: [PATCH] Database version increased, code simplified --- database.sql | 2 +- src/Model/Item.php | 13 ++++--------- static/dbstructure.config.php | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/database.sql b/database.sql index 308e2e8a8..a36adad01 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2022.05-dev (Siberian Iris) --- DB_UPDATE_VERSION 1451 +-- DB_UPDATE_VERSION 1452 -- ------------------------------------------ diff --git a/src/Model/Item.php b/src/Model/Item.php index 9c6742634..96cf5c488 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2516,11 +2516,6 @@ class Item return true; } - $allow_cid = $allow_cid ?? $item['allow_cid']; - $allow_gid = $allow_gid ?? $item['allow_gid']; - $deny_cid = $deny_cid ?? $item['deny_cid']; - $deny_gid = $deny_gid ?? $item['deny_gid']; - $objtype = $item['resource-id'] ? Activity\ObjectType::IMAGE : Activity\ObjectType::NOTE; $new_item = [ @@ -2541,10 +2536,10 @@ class Item 'body' => $activity, 'verb' => $activity, 'object-type' => $objtype, - 'allow_cid' => $allow_cid, - 'allow_gid' => $allow_gid, - 'deny_cid' => $deny_cid, - 'deny_gid' => $deny_gid, + 'allow_cid' => $allow_cid ?? $item['allow_cid'], + 'allow_gid' => $allow_gid ?? $item['allow_gid'], + 'deny_cid' => $deny_cid ?? $item['deny_cid'], + 'deny_gid' => $deny_gid ?? $item['deny_gid'], 'visible' => 1, 'unseen' => 1, ]; diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 01419bf2b..f7e02b10b 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -55,7 +55,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1451); + define('DB_UPDATE_VERSION', 1452); } return [