]> git.mxchange.org Git - friendica.git/blobdiff - static/dbview.config.php
spelling: names
[friendica.git] / static / dbview.config.php
index 925f82462525f5866bb61ac8595d530fd4b5fa62..0f2201953bfc6be7b6f939757c645bd3d5795d6c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
                        "author-hidden" => ["author", "hidden"],
                        "author-updated" => ["author", "updated"],
                        "author-gsid" => ["author", "gsid"],
-                       "author-uri-id" => ["author", "uri-id"],
                        "owner-id" => ["post-user", "owner-id"],
                        "owner-uri-id" => ["owner", "uri-id"],
                        "owner-link" => ["owner", "url"],
                        "parent-author-name" => ["parent-post-author", "name"],
                        "parent-author-nick" => ["parent-post-author", "nick"],
                        "parent-author-network" => ["parent-post-author", "network"],
-                       "parent-author-blocked" => ["parent-post-author", "blocked"],
-                       "parent-author-hidden" => ["parent-post-author", "hidden"],
                ],
                "query" => "FROM `post-user`
                        STRAIGHT_JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid`
                        "author-hidden" => ["author", "hidden"],
                        "author-updated" => ["author", "updated"],
                        "author-gsid" => ["author", "gsid"],
-                       "author-uri-id" => ["author", "uri-id"],
                        "owner-id" => ["post-thread-user", "owner-id"],
                        "owner-uri-id" => ["owner", "uri-id"],
                        "owner-link" => ["owner", "url"],
                        "parent-author-link" => ["parent-post-author", "url"],
                        "parent-author-name" => ["parent-post-author", "name"],
                        "parent-author-network" => ["parent-post-author", "network"],
-                       "parent-author-blocked" => ["parent-post-author", "blocked"],
-                       "parent-author-hidden" => ["parent-post-author", "hidden"],
                ],
                "query" => "FROM `post-thread-user`
                        INNER JOIN `post-user` ON `post-user`.`id` = `post-thread-user`.`post-user-id`
                        "author-hidden" => ["author", "hidden"],
                        "author-updated" => ["author", "updated"],
                        "author-gsid" => ["author", "gsid"],
-                       "author-uri-id" => ["author", "uri-id"],
                        "owner-id" => ["post", "owner-id"],
                        "owner-uri-id" => ["owner", "uri-id"],
                        "owner-link" => ["owner", "url"],
                        "parent-author-link" => ["parent-post-author", "url"],
                        "parent-author-name" => ["parent-post-author", "name"],
                        "parent-author-network" => ["parent-post-author", "network"],
-                       "parent-author-blocked" => ["parent-post-author", "blocked"],
-                       "parent-author-hidden" => ["parent-post-author", "hidden"],
                ],
                "query" => "FROM `post`
                        STRAIGHT_JOIN `post-thread` ON `post-thread`.`uri-id` = `post`.`parent-uri-id`
                        "author-hidden" => ["author", "hidden"],
                        "author-updated" => ["author", "updated"],
                        "author-gsid" => ["author", "gsid"],
-                       "author-uri-id" => ["author", "uri-id"],
                        "owner-id" => ["post-thread", "owner-id"],
                        "owner-uri-id" => ["owner", "uri-id"],
                        "owner-link" => ["owner", "url"],
                        "question-end-time" => ["post-question", "end-time"],
                        "has-categories" => "0",
                        "has-media" => "EXISTS(SELECT `id` FROM `post-media` WHERE `post-media`.`uri-id` = `post-thread`.`uri-id`)",
+                       "total-comments" => "(SELECT COUNT(*) FROM `post` WHERE `parent-uri-id` = `post-thread`.`uri-id` AND `gravity` = 6)",
+                       "total-actors" => "(SELECT COUNT(DISTINCT(`author-id`)) FROM `post` WHERE `parent-uri-id` = `post-thread`.`uri-id` AND `gravity` = 6)",
                        "signed_text" => ["diaspora-interaction", "interaction"],
                        "parent-guid" => ["parent-item-uri", "guid"],
                        "parent-network" => ["parent-post", "network"],
                        "parent-author-link" => ["parent-post-author", "url"],
                        "parent-author-name" => ["parent-post-author", "name"],
                        "parent-author-network" => ["parent-post-author", "network"],
-                       "parent-author-blocked" => ["parent-post-author", "blocked"],
-                       "parent-author-hidden" => ["parent-post-author", "hidden"],
                ],
                "query" => "FROM `post-thread`
                        INNER JOIN `post` ON `post`.`uri-id` = `post-thread`.`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`"
        ],
+       "media-view" => [
+               "fields" => [
+                       "uri-id" => ["post-media", "uri-id"],
+                       "type" => ["post-media", "type"],
+                       "received" => ["post", "received"],
+                       "created" => ["post", "created"],
+                       "private" => ["post", "private"],
+                       "visible" => ["post", "visible"],
+                       "deleted" => ["post", "deleted"],
+                       "thr-parent-id" => ["post", "thr-parent-id"],
+                       "author-id" => ["post", "author-id"],
+                       "gravity" => ["post", "gravity"],
+               ],
+               "query" => "FROM `post-media`
+                       INNER JOIN `post` ON `post-media`.`uri-id` = `post`.`uri-id`"
+       ],
        "tag-view" => [
                "fields" => [
                        "uri-id" => ["post-tag", "uri-id"],
                        "language" => ["user", "language"],
                        "register_date" => ["user", "register_date"],
                        "login_date" => ["user", "login_date"],
+                       "last-activity" => ["user", "last-activity"],
                        "default-location" => ["user", "default-location"],
                        "allow_location" => ["user", "allow_location"],
                        "theme" => ["user", "theme"],
                        "blocked" => ["contact", "blocked"],
                        "dfrn-notify" => ["contact", "notify"],
                        "dfrn-poll" => ["contact", "poll"],
-                       "diaspora-guid" => ["fcontact", "guid"],
-                       "diaspora-batch" => ["fcontact", "batch"],
-                       "diaspora-notify" => ["fcontact", "notify"],
-                       "diaspora-poll" => ["fcontact", "poll"],
-                       "diaspora-alias" => ["fcontact", "alias"],
+                       "diaspora-guid" => ["item-uri", "guid"],
+                       "diaspora-batch" => ["diaspora-contact", "batch"],
+                       "diaspora-notify" => ["diaspora-contact", "notify"],
+                       "diaspora-poll" => ["diaspora-contact", "poll"],
+                       "diaspora-alias" => ["diaspora-contact", "alias"],
                        "ap-uuid" => ["apcontact", "uuid"],
                        "ap-type" => ["apcontact", "type"],
                        "ap-following" => ["apcontact", "following"],
                "query" => "FROM `contact`
                        LEFT JOIN `item-uri` ON `item-uri`.`id` = `contact`.`uri-id`
                        LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `contact`.`uri-id`
-                       LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = contact.`uri-id`
+                       LEFT JOIN `diaspora-contact` ON `diaspora-contact`.`uri-id` = contact.`uri-id`
                        LEFT JOIN `gserver` ON `gserver`.`id` = contact.`gsid`
-                       WHERE `contact`.`uid` = 0"                      
+                       WHERE `contact`.`uid` = 0"
        ],
        "account-user-view" => [
                "fields" => [
                        "reason" => ["ucontact", "reason"],
                        "dfrn-notify" => ["contact", "notify"],
                        "dfrn-poll" => ["contact", "poll"],
-                       "diaspora-guid" => ["fcontact", "guid"],
-                       "diaspora-batch" => ["fcontact", "batch"],
-                       "diaspora-notify" => ["fcontact", "notify"],
-                       "diaspora-poll" => ["fcontact", "poll"],
-                       "diaspora-alias" => ["fcontact", "alias"],
-                       "diaspora-interacting_count" => ["fcontact", "interacting_count"],
-                       "diaspora-interacted_count" => ["fcontact", "interacted_count"],
-                       "diaspora-post_count" => ["fcontact", "post_count"],
+                       "diaspora-guid" => ["item-uri", "guid"],
+                       "diaspora-batch" => ["diaspora-contact", "batch"],
+                       "diaspora-notify" => ["diaspora-contact", "notify"],
+                       "diaspora-poll" => ["diaspora-contact", "poll"],
+                       "diaspora-alias" => ["diaspora-contact", "alias"],
+                       "diaspora-interacting_count" => ["diaspora-contact", "interacting_count"],
+                       "diaspora-interacted_count" => ["diaspora-contact", "interacted_count"],
+                       "diaspora-post_count" => ["diaspora-contact", "post_count"],
                        "ap-uuid" => ["apcontact", "uuid"],
                        "ap-type" => ["apcontact", "type"],
                        "ap-following" => ["apcontact", "following"],
                        INNER JOIN `contact` ON `contact`.`uri-id` = `ucontact`.`uri-id` AND `contact`.`uid` = 0
                        LEFT JOIN `item-uri` ON `item-uri`.`id` = `ucontact`.`uri-id`
                        LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `ucontact`.`uri-id`
-                       LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = `ucontact`.`uri-id` AND `fcontact`.`network` = 'dspr'
+                       LEFT JOIN `diaspora-contact` ON `diaspora-contact`.`uri-id` = `ucontact`.`uri-id`
                        LEFT JOIN `gserver` ON `gserver`.`id` = contact.`gsid`"
        ],
        "pending-view" => [
                "query" => "FROM `profile_field`
                        INNER JOIN `permissionset` ON `permissionset`.`id` = `profile_field`.`psid`"
        ],
+       "diaspora-contact-view" => [
+               "fields" => [
+                       "uri-id" => ["diaspora-contact", "uri-id"],
+                       "url" => ["item-uri", "uri"],
+                       "guid" => ["item-uri", "guid"],
+                       "addr" => ["diaspora-contact", "addr"],
+                       "alias" => ["diaspora-contact", "alias"],
+                       "nick" => ["diaspora-contact", "nick"],
+                       "name" => ["diaspora-contact", "name"],
+                       "given-name" => ["diaspora-contact", "given-name"],
+                       "family-name" => ["diaspora-contact", "family-name"],
+                       "photo" => ["diaspora-contact", "photo"],
+                       "photo-medium" => ["diaspora-contact", "photo-medium"],
+                       "photo-small" => ["diaspora-contact", "photo-small"],
+                       "batch" => ["diaspora-contact", "batch"],
+                       "notify" => ["diaspora-contact", "notify"],
+                       "poll" => ["diaspora-contact", "poll"],
+                       "subscribe" => ["diaspora-contact", "subscribe"],
+                       "searchable" => ["diaspora-contact", "searchable"],
+                       "pubkey" => ["diaspora-contact", "pubkey"],
+                       "baseurl" => ["gserver", "url"],
+                       "gsid" => ["diaspora-contact", "gsid"],
+                       "created" => ["diaspora-contact", "created"],
+                       "updated" => ["diaspora-contact", "updated"],
+                       "interacting_count" => ["diaspora-contact", "interacting_count"],
+                       "interacted_count" => ["diaspora-contact", "interacted_count"],
+                       "post_count" => ["diaspora-contact", "post_count"],
+               ],
+               "query" => "FROM `diaspora-contact`
+                       INNER JOIN `item-uri` ON `item-uri`.`id` = `diaspora-contact`.`uri-id`
+                       LEFT JOIN `gserver` ON `gserver`.`id` = `diaspora-contact`.`gsid`"
+       ],
 ];
-