]> git.mxchange.org Git - friendica.git/blobdiff - mod/display.php
Worker fastlane can now be activated from the admin interface
[friendica.git] / mod / display.php
index 4ee26b7405ad48a3b9aebcd58e73cbdceae31d0c..f879a91aeca49ec4a135d7ed36e7d80520c148f1 100644 (file)
@@ -362,18 +362,15 @@ function display_content(&$a, $update = 0) {
                        return '';
        }
 
-       $r = q("SELECT %s, %s FROM `item`
-               INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` AND %s
-               WHERE %s AND `item`.`uid` = %d
+       $r = q(item_query()." AND `item`.`uid` = %d
                AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `id` = %d)
                $sql_extra
                ORDER BY `parent` DESC, `gravity` ASC, `id` ASC",
-               item_fieldlist(), contact_fieldlist(),
-               contact_condition(), item_condition(),
                intval($a->profile['uid']),
                intval($item_id)
        );
 
+
        if(!$r && local_user()) {
                // Check if this is another person's link to a post that we have
                $r = q("SELECT `item`.uri FROM `item`
@@ -385,13 +382,9 @@ function display_content(&$a, $update = 0) {
                if($r) {
                        $item_uri = $r[0]['uri'];
 
-                       $r = q("SELECT %s, %s FROM `item`
-                               INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` AND %s
-                               WHERE %s AND `item`.`uid` = %d
+                       $r = q(item_query()." AND `item`.`uid` = %d
                                AND `item`.`parent` = (SELECT `parent` FROM `item` WHERE `uri` = '%s' AND uid = %d)
                                ORDER BY `parent` DESC, `gravity` ASC, `id` ASC ",
-                               item_fieldlist(), contact_fieldlist(),
-                               contact_condition(), item_condition(),
                                intval(local_user()),
                                dbesc($item_uri),
                                intval(local_user())
@@ -399,7 +392,6 @@ function display_content(&$a, $update = 0) {
                }
        }
 
-
        if($r) {
 
                if((local_user()) && (local_user() == $a->profile['uid'])) {