Replace remaining references to default banner image by api.mastodon_banner configuration value

- Ensure leading slash is present at every place the configuration value is used
This commit is contained in:
Hypolite Petovan 2023-08-17 07:35:19 -04:00
parent 5d7985dcff
commit dad3404ac5
5 changed files with 61 additions and 6 deletions

View file

@ -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;
@ -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()));
}
}