From f50a39d19daeeed6c13ec59a529368baa9a31c85 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 22 Mar 2020 10:04:30 -0400 Subject: [PATCH 1/3] Remove extraneous relation on item-activity.id --- static/dbstructure.config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 7c400a892..5afc17eaf 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -759,7 +759,7 @@ return [ "item-activity" => [ "comment" => "Activities for items", "fields" => [ - "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]], + "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"], "uri" => ["type" => "varchar(255)", "comment" => ""], "uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"], "uri-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"], From 8bde222fca2c8295be8ae39036f539e87b8cba71 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 22 Mar 2020 14:07:34 +0000 Subject: [PATCH 2/3] Issue 8371: Use correct user id for photo upload --- mod/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/item.php b/mod/item.php index ba79d507b..85ec3b1d2 100644 --- a/mod/item.php +++ b/mod/item.php @@ -461,7 +461,7 @@ function item_post(App $a) { $match = null; - if (!$preview && Photo::setPermissionFromBody($body, $profile_uid, $original_contact_id, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny)) { + if (!$preview && Photo::setPermissionFromBody($body, $uid, $original_contact_id, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny)) { $objecttype = Activity\ObjectType::IMAGE; } From f2638ca65befaee29e2807c5c22b7f0c75e9f971 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 22 Mar 2020 10:28:13 -0400 Subject: [PATCH 3/3] Remove extraneous relation on item-content.id --- static/dbstructure.config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 5afc17eaf..707e39468 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -775,7 +775,7 @@ return [ "item-content" => [ "comment" => "Content for all posts", "fields" => [ - "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]], + "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"], "uri" => ["type" => "varchar(255)", "comment" => ""], "uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"], "uri-plink-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],