]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Merge pull request #8753 from MrPetovan/bug/fatal-errors
[friendica.git] / mod / photos.php
index 7a647e06b94ef64f2440fe14802b2496375c0bb4..2b72fd3e4ec91c70b5d9eb52071d47ab83afd683 100644 (file)
@@ -82,7 +82,7 @@ function photos_init(App $a) {
                        '$photo' => $profile['photo'],
                        '$addr' => $profile['addr'] ?? '',
                        '$account_type' => $account_type,
-                       '$about' => BBCode::convert($profile['about'] ?? ''),
+                       '$about' => BBCode::convert($profile['about']),
                ]);
 
                $albums = Photo::getAlbums($a->data['user']['uid']);
@@ -1287,7 +1287,7 @@ function photos_content(App $a)
                }
 
                if (!empty($link_item['parent']) && !empty($link_item['uid'])) {
-                       $condition = ["`parent` = ? AND `parent` != `id`",  $link_item['parent']];
+                       $condition = ["`parent` = ? AND `gravity` != ?",  $link_item['parent'], GRAVITY_PARENT];
                        $total = DBA::count('item', $condition);
 
                        $pager = new Pager(DI::l10n(), DI::args()->getQueryString());
@@ -1456,7 +1456,7 @@ function photos_content(App $a)
 
                                        if (($activity->match($item['verb'], Activity::LIKE) ||
                                             $activity->match($item['verb'], Activity::DISLIKE)) &&
-                                           ($item['id'] != $item['parent'])) {
+                                           ($item['gravity'] != GRAVITY_PARENT)) {
                                                continue;
                                        }