X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fostatus.php;h=bcd8fd671302bffd4527ab1160d277d7095602ef;hb=d49325d177cf03b97df250ca3cb081421c541049;hp=556c81e987901b6d7f9a7805fd2d6e279a7dc836;hpb=fd3cf1cd02b57e9796e5537dbee468d1c8048a48;p=friendica.git diff --git a/include/ostatus.php b/include/ostatus.php index 556c81e987..bcd8fd6713 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -810,10 +810,11 @@ class ostatus { `item`.`verb`, `item`.`visible` FROM `term` STRAIGHT_JOIN `item` AS `thritem` ON `thritem`.`parent` = `term`.`oid` STRAIGHT_JOIN `item` ON `item`.`parent` = `thritem`.`parent` - WHERE `term`.`uid` = %d AND `term`.`otype` = %d AND `term`.`type` = %d AND `term`.`url` = '%s'))", + WHERE `term`.`uid` = %d AND `term`.`otype` = %d AND `term`.`type` = %d AND `term`.`url` = '%s'", intval($uid), intval(TERM_OBJ_POST), intval(TERM_CONVERSATION), dbesc($conversation_url)); -/* +/* 2016-10-23: The old query will be kept until we are sure that the query above is a good and fast replacement + $parents = q("SELECT `id`, `parent`, `uri`, `contact-id`, `type`, `verb`, `visible` FROM `item` WHERE `id` IN (SELECT `parent` FROM `item` WHERE `id` IN (SELECT `oid` FROM `term` WHERE `uid` = %d AND `otype` = %d AND `type` = %d AND `url` = '%s'))", @@ -1981,7 +1982,9 @@ class ostatus { intval($owner["uid"]), intval($owner["id"]), intval($authorid), dbesc($check_date), dbesc(NETWORK_OSTATUS), dbesc(NETWORK_DFRN)); -/* + +/* 2016-10-23: The old query will be kept until we are sure that the query above is a good and fast replacement + $items = q("SELECT `item`.*, `item`.`id` AS `item_id` FROM `item` STRAIGHT_JOIN `thread` ON `thread`.`iid` = `item`.`parent` LEFT JOIN `item` AS `thritem` ON `thritem`.`uri`=`item`.`thr-parent` AND `thritem`.`uid`=`item`.`uid`