]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
Removed commented code
[friendica.git] / mod / profile.php
index a8a6ad3885d679a4bb40535c5df5191813655dd2..279f8635231591e8e2444fa54453aa12169023bc 100644 (file)
@@ -282,16 +282,20 @@ function profile_content(&$a, $update = 0) {
                $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
 
                $r = q("SELECT `thread`.`iid` AS `item_id`, `thread`.`network` AS `item_network`
-                       FROM `thread` FORCE INDEX (`uid_created`) INNER JOIN `item` ON `item`.`id` = `thread`.`iid`
-                       $sql_post_table INNER JOIN `contact` ON `contact`.`id` = `thread`.`contact-id`
-                       AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
-                       WHERE `thread`.`uid` = %d AND `thread`.`visible` = 1 AND `thread`.`deleted` = 0
-                       and `thread`.`moderated` = 0
-                       AND `thread`.`wall` = 1
-                       $sql_extra $sql_extra2
-                       ORDER BY `thread`.`created` DESC $pager_sql ",
-                       intval($a->profile['profile_uid'])
-
+                       FROM `thread`
+                       STRAIGHT_JOIN `item` ON `item`.`id` = `thread`.`iid`
+                       $sql_post_table
+                       STRAIGHT_JOIN `contact` ON `contact`.`id` = `thread`.`contact-id`
+                               AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
+                       WHERE `thread`.`uid` = %d AND `thread`.`visible`
+                               AND `thread`.`contact-id` = %d
+                               AND NOT `thread`.`deleted`
+                               AND NOT `thread`.`moderated`
+                               AND `thread`.`wall`
+                               $sql_extra $sql_extra2
+                       ORDER BY `thread`.`created` DESC $pager_sql",
+                       intval($a->profile['profile_uid']),
+                       intval($a->profile['contact_id'])
                );
        }