]> git.mxchange.org Git - friendica.git/commitdiff
Add missing fields to collection
authorMichael <heluecht@pirati.ca>
Fri, 29 Apr 2022 10:13:23 +0000 (10:13 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 29 Apr 2022 10:13:23 +0000 (10:13 +0000)
database.sql
src/Model/Item.php
static/dbview.config.php

index 785b0f7b54ca47f89cee60d0a0a51ddd04af907c..7a8ee0adb78b587a012e3d5a46af3a0f997a6e9b 100644 (file)
@@ -2246,9 +2246,14 @@ CREATE VIEW `collection-view` AS SELECT
        `post-collection`.`type` AS `type`,
        `post`.`author-id` AS `cid`,
        `post`.`received` AS `received`,
-       `post`.`created` AS `created`
+       `post`.`created` AS `created`,
+       `post-thread`.`commented` AS `commented`,
+       `post`.`thr-parent-id` AS `thr-parent-id`,
+       `post`.`author-id` AS `author-id`,
+       `post`.`gravity` AS `gravity`
        FROM `post-collection`
-                       INNER JOIN `post` ON `post-collection`.`uri-id` = `post`.`uri-id`;
+                       INNER JOIN `post` ON `post-collection`.`uri-id` = `post`.`uri-id`
+                       INNER JOIN `post-thread` ON `post-thread`.`uri-id` = `post`.`parent-uri-id`;
 
 --
 -- VIEW tag-view
index 84fa0af11b049fe55d5fc6adb8777c840b7c1b90..b63b98d77376ddd80d71617a722b9ecf732d8190 100644 (file)
@@ -87,7 +87,7 @@ class Item
                'wall', 'private', 'starred', 'origin', 'parent-origin', 'title', 'body', 'language',
                'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object',
                'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'mention', 'global',
-               'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network', 'author-updated', 'author-gsid',
+               'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network', 'author-updated', 'author-gsid', 'author-addr',
                'owner-id', 'owner-link', 'owner-name', 'owner-avatar', 'owner-network', 'owner-contact-type', 'owner-updated',
                'causer-id', 'causer-link', 'causer-name', 'causer-avatar', 'causer-contact-type', 'causer-network',
                'contact-id', 'contact-uid', 'contact-link', 'contact-name', 'contact-avatar',
index a623e4636508c9a8f99b3973029a532001c90f2f..ea991489d67b0e9d74445bfb3882c508907b410b 100644 (file)
                        "cid" => ["post", "author-id"],
                        "received" => ["post", "received"],
                        "created" => ["post", "created"],
+                       "commented" => ["post-thread", "commented"],
+                       "thr-parent-id" => ["post", "thr-parent-id"],
+                       "author-id" => ["post", "author-id"],
+                       "gravity" => ["post", "gravity"],
                ],
                "query" => "FROM `post-collection`
-                       INNER JOIN `post` ON `post-collection`.`uri-id` = `post`.`uri-id`"
+                       INNER JOIN `post` ON `post-collection`.`uri-id` = `post`.`uri-id`
+                       INNER JOIN `post-thread` ON `post-thread`.`uri-id` = `post`.`parent-uri-id`"
        ],
        "tag-view" => [
                "fields" => [