]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Issue 9948: Remove "@" from full text search
[friendica.git] / mod / photos.php
index 71e32d4de4046cffb539328aee7e7aae8a132cc3..4ce44bedc9fe2472398402e6cc715a455db3dde8 100644 (file)
@@ -1266,7 +1266,7 @@ function photos_content(App $a)
                // as a "post" but displaying instead the photo it is linked to
 
                /// @todo Rewrite this query. To do so, $sql_extra must be changed
-               $linked_items = q("SELECT `id` FROM `post-view` WHERE `resource-id` = '%s' $sql_extra LIMIT 1",
+               $linked_items = q("SELECT `id` FROM `post-user-view` WHERE `resource-id` = '%s' $sql_extra LIMIT 1",
                        DBA::escape($datum)
                );
                if (DBA::isResult($linked_items)) {
@@ -1454,7 +1454,9 @@ function photos_content(App $a)
                                                continue;
                                        }
 
-                                       $profile_url = Contact::magicLinkById($item['author-id']);
+                                       $author = ['uid' => 0, 'id' => $item['author-id'],
+                                               'network' => $item['author-network'], 'url' => $item['author-link']];
+                                       $profile_url = Contact::magicLinkByContact($author);
                                        if (strpos($profile_url, 'redir/') === 0) {
                                                $sparkle = ' sparkle';
                                        } else {