. * * Main view structure configuration file. * * Here are described all the view Friendica needs to work. * * Syntax (braces indicate optionale values): * "" => [ * "fields" => [ * "" => ["table", "field"], * "" => "SQL expression", * ... * ], * "query" => "FROM `table` INNER JOIN `other-table` ..." * ], * ], * * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value in dbstructure.config.php. * */ return [ "tag-view" => [ "fields" => [ "uri-id" => ["post-tag", "uri-id"], "uri" => ["item-uri", "uri"], "guid" => ["item-uri", "guid"], "type" => ["post-tag", "type"], "tid" => ["post-tag", "tid"], "cid" => ["post-tag", "cid"], "name" => "CASE `cid` WHEN 0 THEN `tag`.`name` ELSE `contact`.`name` END", "url" => "CASE `cid` WHEN 0 THEN `tag`.`url` ELSE `contact`.`url` END", ], "query" => "FROM `post-tag` INNER JOIN `item-uri` ON `item-uri`.id = `post-tag`.`uri-id` LEFT JOIN `tag` ON `post-tag`.`tid` = `tag`.`id` LEFT JOIN `contact` ON `post-tag`.`cid` = `contact`.`id`" ] ];