All item selects are now done by the post class
This commit is contained in:
parent
2d0443a109
commit
b892db0cf3
16 changed files with 108 additions and 688 deletions
|
@ -55,7 +55,7 @@
|
|||
use Friendica\Database\DBA;
|
||||
|
||||
if (!defined('DB_UPDATE_VERSION')) {
|
||||
define('DB_UPDATE_VERSION', 1391);
|
||||
define('DB_UPDATE_VERSION', 1392);
|
||||
}
|
||||
|
||||
return [
|
||||
|
|
|
@ -126,18 +126,18 @@
|
|||
"author-id" => ["item", "author-id"],
|
||||
"author-link" => ["author", "url"],
|
||||
"author-addr" => ["author", "addr"],
|
||||
"author-name" => "IF (`contact`.`url` = `author`.`url`, `contact`.`name`, `author`.`name`)",
|
||||
"author-name" => "IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`)",
|
||||
"author-nick" => ["author", "nick"],
|
||||
"author-avatar" => "IF (`contact`.`url` = `author`.`url`, `contact`.`thumb`, `author`.`thumb`)",
|
||||
"author-avatar" => "IF (`contact`.`url` = `author`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `author`.`thumb`)",
|
||||
"author-network" => ["author", "network"],
|
||||
"author-blocked" => ["author", "blocked"],
|
||||
"author-hidden" => ["author", "hidden"],
|
||||
"owner-id" => ["item", "owner-id"],
|
||||
"owner-link" => ["owner", "url"],
|
||||
"owner-addr" => ["owner", "addr"],
|
||||
"owner-name" => "IF (`contact`.`url` = `owner`.`url`, `contact`.`name`, `owner`.`name`)",
|
||||
"owner-name" => "IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`)",
|
||||
"owner-nick" => ["owner", "nick"],
|
||||
"owner-avatar" => "IF (`contact`.`url` = `owner`.`url`, `contact`.`thumb`, `owner`.`thumb`)",
|
||||
"owner-avatar" => "IF (`contact`.`url` = `owner`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `owner`.`thumb`)",
|
||||
"owner-network" => ["owner", "network"],
|
||||
"owner-blocked" => ["owner", "blocked"],
|
||||
"owner-hidden" => ["owner", "hidden"],
|
||||
|
@ -219,7 +219,6 @@
|
|||
"commented" => ["thread", "commented"],
|
||||
"received" => ["thread", "received"],
|
||||
"changed" => ["thread", "changed"],
|
||||
"edited" => ["thread", "edited"],
|
||||
"resource-id" => ["item", "resource-id"],
|
||||
"post-type" => ["thread", "post-type"],
|
||||
"private" => ["thread", "private"],
|
||||
|
@ -286,18 +285,18 @@
|
|||
"author-id" => ["thread", "author-id"],
|
||||
"author-link" => ["author", "url"],
|
||||
"author-addr" => ["author", "addr"],
|
||||
"author-name" => "IF (`contact`.`url` = `author`.`url`, `contact`.`name`, `author`.`name`)",
|
||||
"author-name" => "IF (`contact`.`url` = `author`.`url` AND `contact`.`name` != '', `contact`.`name`, `author`.`name`)",
|
||||
"author-nick" => ["author", "nick"],
|
||||
"author-avatar" => "IF (`contact`.`url` = `author`.`url`, `contact`.`thumb`, `author`.`thumb`)",
|
||||
"author-avatar" => "IF (`contact`.`url` = `author`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `author`.`thumb`)",
|
||||
"author-network" => ["author", "network"],
|
||||
"author-blocked" => ["author", "blocked"],
|
||||
"author-hidden" => ["author", "hidden"],
|
||||
"owner-id" => ["thread", "owner-id"],
|
||||
"owner-link" => ["owner", "url"],
|
||||
"owner-addr" => ["owner", "addr"],
|
||||
"owner-name" => "IF (`contact`.`url` = `owner`.`url`, `contact`.`name`, `owner`.`name`)",
|
||||
"owner-name" => "IF (`contact`.`url` = `owner`.`url` AND `contact`.`name` != '', `contact`.`name`, `owner`.`name`)",
|
||||
"owner-nick" => ["owner", "nick"],
|
||||
"owner-avatar" => "IF (`contact`.`url` = `owner`.`url`, `contact`.`thumb`, `owner`.`thumb`)",
|
||||
"owner-avatar" => "IF (`contact`.`url` = `owner`.`url` AND `contact`.`thumb` != '', `contact`.`thumb`, `owner`.`thumb`)",
|
||||
"owner-network" => ["owner", "network"],
|
||||
"owner-blocked" => ["owner", "blocked"],
|
||||
"owner-hidden" => ["owner", "hidden"],
|
||||
|
@ -352,7 +351,7 @@
|
|||
LEFT JOIN `item-content` ON `item-content`.`uri-id` = `thread`.`uri-id`
|
||||
LEFT JOIN `post-delivery-data` ON `post-delivery-data`.`uri-id` = `thread`.`uri-id` AND `thread`.`origin`
|
||||
LEFT JOIN `permissionset` ON `permissionset`.`id` = `item`.`psid`
|
||||
STRAIGHT_JOIN `item` AS `parent-item` ON `parent-item`.`uri-id` = `item`.`parent-uri-id` AND `parent-item`.`uid` = `item`.`uid`
|
||||
STRAIGHT_JOIN `item` AS `parent-item` ON `parent-item`.`id` = `item`.`parent`
|
||||
STRAIGHT_JOIN `contact` AS `parent-item-author` ON `parent-item-author`.`id` = `parent-item`.`author-id`"
|
||||
],
|
||||
"category-view" => [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue