]> git.mxchange.org Git - friendica.git/blobdiff - static/dbview.config.php
New function to resize an image to not exceed a given file size
[friendica.git] / static / dbview.config.php
index 004063a4185d293e0a3eac4547fdc4cb2ccd6e66..e8641240c2c2de4653ea2b6f79877d4fe03d7ea5 100644 (file)
                "query" => "FROM `application-token`
                        INNER JOIN `application` ON `application-token`.`application-id` = `application`.`id`"
        ],
+       "circle-member-view" => [
+               "fields" => [
+                       "id" => ["group_member", "id"],
+                       "uid" => ["group", "uid"],
+                       "contact-id" => ["group_member", "contact-id"],
+                       "contact-uri-id" => ["contact", "uri-id"],
+                       "contact-link" => ["contact", "url"],
+                       "contact-addr" => ["contact", "addr"],
+                       "contact-name" => ["contact", "name"],
+                       "contact-nick" => ["contact", "nick"],
+                       "contact-avatar" => ["contact", "thumb"],
+                       "contact-network" => ["contact", "network"],
+                       "contact-blocked" => ["contact", "blocked"],
+                       "contact-hidden" => ["contact", "hidden"],
+                       "contact-readonly" => ["contact", "readonly"],
+                       "contact-archive" => ["contact", "archive"],
+                       "contact-pending" => ["contact", "pending"],
+                       "contact-self" => ["contact", "self"],
+                       "contact-rel" => ["contact", "rel"],
+                       "contact-contact-type" => ["contact", "contact-type"],
+                       "circle-id" => ["group_member", "gid"],
+                       "circle-visible" => ["group", "visible"],
+                       "circle-deleted" => ["group", "deleted"],
+                       "circle-name" => ["group", "name"],
+               ],
+               "query" => "FROM `group_member`
+                       INNER JOIN `contact` ON `group_member`.`contact-id` = `contact`.`id`
+                       INNER JOIN `group` ON `group_member`.`gid` = `group`.`id`"
+       ],
        "post-user-view" => [
                "fields" => [
                        "id" => ["post-user", "id"],
                ],
                "query" => "FROM `post-user`
                        INNER JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid`                     
-                       INNER JOIN `contact` ON `contact`.`id` = `post-thread-user`.`contact-id`
+                       STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-thread-user`.`contact-id`
+                       STRAIGHT_JOIN `contact` AS `authorcontact` ON `authorcontact`.`id` = `post-thread-user`.`author-id`
+                       STRAIGHT_JOIN `contact` AS `ownercontact` ON `ownercontact`.`id` = `post-thread-user`.`owner-id`
                        LEFT JOIN `user-contact` AS `author` ON `author`.`uid` = `post-thread-user`.`uid` AND `author`.`cid` = `post-thread-user`.`author-id`
                        LEFT JOIN `user-contact` AS `owner` ON `owner`.`uid` = `post-thread-user`.`uid` AND `owner`.`cid` = `post-thread-user`.`owner-id`
-                       INNER JOIN `contact` AS `ownercontact` ON `ownercontact`.`id` = `post-thread-user`.`owner-id`
                        WHERE `post-user`.`visible` AND NOT `post-user`.`deleted`
                        AND (NOT `contact`.`readonly` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`)
                        AND (`post-user`.`hidden` IS NULL OR NOT `post-user`.`hidden`)
+                       AND NOT `authorcontact`.`blocked` AND NOT `ownercontact`.`blocked`
                        AND (`author`.`blocked` IS NULL OR NOT `author`.`blocked`)
                        AND (`owner`.`blocked` IS NULL OR NOT `owner`.`blocked`)"
        ],
                "query" => "FROM `post-thread-user`
                        INNER JOIN `post-user` ON `post-user`.`id` = `post-thread-user`.`post-user-id`
                        STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-thread-user`.`contact-id`
+                       STRAIGHT_JOIN `contact` AS `authorcontact` ON `authorcontact`.`id` = `post-thread-user`.`author-id`
+                       STRAIGHT_JOIN `contact` AS `ownercontact` ON `ownercontact`.`id` = `post-thread-user`.`owner-id`
                        LEFT JOIN `user-contact` AS `author` ON `author`.`uid` = `post-thread-user`.`uid` AND `author`.`cid` = `post-thread-user`.`author-id`
                        LEFT JOIN `user-contact` AS `owner` ON `owner`.`uid` = `post-thread-user`.`uid` AND `owner`.`cid` = `post-thread-user`.`owner-id`
-                       LEFT JOIN `contact` AS `ownercontact` ON `ownercontact`.`id` = `post-thread-user`.`owner-id`
                        WHERE `post-user`.`visible` AND NOT `post-user`.`deleted`
                        AND (NOT `contact`.`readonly` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`)
                        AND (`post-thread-user`.`hidden` IS NULL OR NOT `post-thread-user`.`hidden`)
+                       AND NOT `authorcontact`.`blocked` AND NOT `ownercontact`.`blocked`
                        AND (`author`.`blocked` IS NULL OR NOT `author`.`blocked`)
                        AND (`owner`.`blocked` IS NULL OR NOT `owner`.`blocked`)"
        ],