]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Merge pull request #11099 from nupplaphil/feat/session_cache
[friendica.git] / mod / photos.php
index 6cfdd6a998a558bb611704c350fdcc58eebf5270..9b69867461a5d0f069be1f19d4dd8a3fb8875954 100644 (file)
@@ -204,7 +204,7 @@ function photos_post(App $a)
                }
 
                // RENAME photo album
-               $newalbum = trim($_POST['albumname']);
+               $newalbum = trim($_POST['albumname'] ?? '');
                if ($newalbum != $album) {
                        Photo::update(['album' => $newalbum], ['album' => $album, 'uid' => $page_owner_uid]);
                        // Update the photo albums cache
@@ -604,7 +604,7 @@ function photos_post(App $a)
         * they acquire comments, likes, dislikes, and/or tags
         */
 
-       $r = Photo::selectToArray([], ['`album` = ? AND `uid` = ? AND `created` > UTC_TIMESTAMP() - INTERVAL 3 HOUR', $album, $page_owner_uid]);
+       $r = Photo::selectToArray([], ['`album` = ? AND `uid` = ? AND `created` > ?', $album, $page_owner_uid, DateTimeFormat::utc('now - 3 hours')]);
 
        if (!DBA::isResult($r) || ($album == DI::l10n()->t(Photo::PROFILE_PHOTOS))) {
                $visible = 1;
@@ -1432,7 +1432,7 @@ function photos_content(App $a)
                                        ];
 
                                        $title_e = $item['title'];
-                                       $body_e = BBCode::convert($item['body']);
+                                       $body_e = BBCode::convertForUriId($item['uri-id'], $item['body']);
 
                                        $comments .= Renderer::replaceMacros($template,[
                                                '$id' => $item['id'],