]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Photo.php
Merge pull request #13800 from annando/channel-languages
[friendica.git] / src / Module / Photo.php
index 954b3f3eecca60dab3911b439eab9a08fea4d734..133c91d8d93d8e952f7650ae490ea55199d4b882 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2023, the Friendica project
+ * @copyright Copyright (C) 2010-2024, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,6 +22,7 @@
 namespace Friendica\Module;
 
 use Friendica\BaseModule;
+use Friendica\Contact\Header;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Database\DBA;
@@ -76,7 +77,7 @@ class Photo extends BaseApi
                        throw new NotModifiedException();
                }
 
-               Profile::addVisitorCookieForHTTPSigner();
+               Profile::addVisitorCookieForHTTPSigner($this->server);
 
                $customsize = 0;
                $square_resize = true;
@@ -482,6 +483,6 @@ class Photo extends BaseApi
                if (!empty($photo)) {
                        return $photo;
                }
-               return MPhoto::createPhotoForImageData(file_get_contents(DI::basePath() . '/images/friendica-banner.jpg'));
+               return MPhoto::createPhotoForImageData(file_get_contents(DI::basePath() . (new Header(DI::config()))->getMastodonBannerPath()));
        }
 }