]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Test the license check
[friendica.git] / mod / photos.php
index b4ffb756c160248b58cb47a8057610a8963cb828..52d749bb46f841f3f37e93fc91d76506ba261dd5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -158,7 +158,7 @@ function photos_post(App $a)
 
        if (!$can_post) {
                notice(DI::l10n()->t('Permission denied.'));
-               exit();
+               System::exit();
        }
 
        $owner_record = User::getOwnerDataById($page_owner_uid);
@@ -166,7 +166,7 @@ function photos_post(App $a)
        if (!$owner_record) {
                notice(DI::l10n()->t('Contact information unavailable'));
                DI::logger()->info('photos_post: unable to locate contact record for page owner. uid=' . $page_owner_uid);
-               exit();
+               System::exit();
        }
 
        $aclFormatter = DI::aclFormatter();
@@ -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'],