Merge pull request #3199 from annando/issue-3196

Bugfix Issue 3196: Not all forum posts weren't shown
This commit is contained in:
Tobias Diekershoff 2017-03-02 07:29:45 +01:00 committed by GitHub
commit e66ad9d6bd
5 changed files with 9 additions and 8 deletions

View file

@ -40,7 +40,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_CODENAME', 'Asparagus');
define ( 'FRIENDICA_VERSION', '3.5.1-rc' ); define ( 'FRIENDICA_VERSION', '3.5.1-rc' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1214 ); define ( 'DB_UPDATE_VERSION', 1215 );
/** /**
* @brief Constant with a HTML line break. * @brief Constant with a HTML line break.

View file

@ -1,6 +1,6 @@
-- ------------------------------------------ -- ------------------------------------------
-- Friendica 3.5.1-dev (Asparagus) -- Friendica 3.5.1-rc (Asparagus)
-- DB_UPDATE_VERSION 1213 -- DB_UPDATE_VERSION 1215
-- ------------------------------------------ -- ------------------------------------------
@ -532,6 +532,7 @@ CREATE TABLE IF NOT EXISTS `item` (
INDEX `parent-uri` (`parent-uri`), INDEX `parent-uri` (`parent-uri`),
INDEX `extid` (`extid`), INDEX `extid` (`extid`),
INDEX `uid_id` (`uid`,`id`), INDEX `uid_id` (`uid`,`id`),
INDEX `uid_contactid_id` (`uid`,`contact-id`,`id`),
INDEX `uid_created` (`uid`,`created`), INDEX `uid_created` (`uid`,`created`),
INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`), INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),
INDEX `uid_network_received` (`uid`,`network`,`received`), INDEX `uid_network_received` (`uid`,`network`,`received`),
@ -1016,7 +1017,8 @@ CREATE TABLE IF NOT EXISTS `thread` (
INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`), INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`),
INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
INDEX `uid_created` (`uid`,`created`), INDEX `uid_created` (`uid`,`created`),
INDEX `uid_commented` (`uid`,`commented`) INDEX `uid_commented` (`uid`,`commented`),
INDEX `uid_wall_created` (`uid`,`wall`,`created`)
) DEFAULT CHARSET=utf8mb4; ) DEFAULT CHARSET=utf8mb4;
-- --

View file

@ -1526,6 +1526,7 @@ function db_definition($charset) {
"uid_contactid_created" => array("uid","contact-id","created"), "uid_contactid_created" => array("uid","contact-id","created"),
"uid_created" => array("uid","created"), "uid_created" => array("uid","created"),
"uid_commented" => array("uid","commented"), "uid_commented" => array("uid","commented"),
"uid_wall_created" => array("uid","wall","created"),
) )
); );
$database["tokens"] = array( $database["tokens"] = array(

View file

@ -282,14 +282,12 @@ function profile_content(App $a, $update = 0) {
STRAIGHT_JOIN `contact` ON `contact`.`id` = `thread`.`contact-id` STRAIGHT_JOIN `contact` ON `contact`.`id` = `thread`.`contact-id`
AND NOT `contact`.`blocked` AND NOT `contact`.`pending` AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
WHERE `thread`.`uid` = %d AND `thread`.`visible` WHERE `thread`.`uid` = %d AND `thread`.`visible`
AND `thread`.`contact-id` = %d
AND NOT `thread`.`deleted` AND NOT `thread`.`deleted`
AND NOT `thread`.`moderated` AND NOT `thread`.`moderated`
AND `thread`.`wall` AND `thread`.`wall`
$sql_extra $sql_extra2 $sql_extra $sql_extra2
ORDER BY `thread`.`created` DESC $pager_sql", ORDER BY `thread`.`created` DESC $pager_sql",
intval($a->profile['profile_uid']), intval($a->profile['profile_uid'])
intval($a->profile['contact_id'])
); );
} }

View file

@ -1,6 +1,6 @@
<?php <?php
define('UPDATE_VERSION' , 1214); define('UPDATE_VERSION' , 1215);
/** /**
* *