From 2f49e984bd3556338ad934ba821dfe9bd56b6636 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 10 Jan 2016 14:12:05 +0100 Subject: [PATCH] Updated database.sql file, further code cleanup --- database.sql | 6 +++++- mod/network.php | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/database.sql b/database.sql index 4e6f3d35c7..df5ec74e29 100644 --- a/database.sql +++ b/database.sql @@ -338,6 +338,8 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( `nsfw` tinyint(1) NOT NULL DEFAULT 0, `network` varchar(255) NOT NULL DEFAULT '', `addr` varchar(255) NOT NULL DEFAULT '', + `notify` text NOT NULL, + `alias` varchar(255) NOT NULL DEFAULT '', `generation` tinyint(3) NOT NULL DEFAULT 0, `server_url` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY(`id`), @@ -539,7 +541,7 @@ CREATE TABLE IF NOT EXISTS `item` ( INDEX `uid_thrparent` (`uid`,`thr-parent`), INDEX `uid_parenturi` (`uid`,`parent-uri`), INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), - INDEX `uid_gcontactid_created` (`uid`,`gcontact-id`,`created`), + INDEX `gcontactid_uid_created` (`gcontact-id`,`uid`,`created`), INDEX `wall_body` (`wall`,`body`(6)), INDEX `uid_visible_moderated_created` (`uid`,`visible`,`moderated`,`created`), INDEX `uid_uri` (`uid`,`uri`), @@ -986,6 +988,8 @@ CREATE TABLE IF NOT EXISTS `thread` ( INDEX `uid_network_created` (`uid`,`network`,`created`), INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`), INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), + INDEX `uid_gcontactid_commented` (`uid`,`gcontact-id`,`commented`), + INDEX `uid_gcontactid_created` (`uid`,`gcontact-id`,`created`), INDEX `wall_private_received` (`wall`,`private`,`received`), INDEX `uid_created` (`uid`,`created`), INDEX `uid_commented` (`uid`,`commented`) diff --git a/mod/network.php b/mod/network.php index a12fa4ec36..3317dc684b 100644 --- a/mod/network.php +++ b/mod/network.php @@ -588,10 +588,6 @@ function network_content(&$a, $update = 0) { intval($cid) ); if(count($r)) { - //$sql_post_table = " INNER JOIN (SELECT DISTINCT(`parent`) FROM `item` - // WHERE 1 $sql_options AND `contact-id` = ".intval($cid)." AND `deleted` = 0 - // ORDER BY `item`.`received` DESC) AS `temp1` - // ON $sql_table.$sql_parent = `temp1`.`parent` "; $sql_extra = " AND ".$sql_table.".`contact-id` = ".intval($cid); $entries[0] = array( -- 2.39.5