mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:10:11 +00:00
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:
parent
5d7985dcff
commit
dad3404ac5
5 changed files with 61 additions and 6 deletions
|
@ -23,6 +23,7 @@ namespace Friendica\Module\Api\Mastodon;
|
|||
|
||||
use Exception;
|
||||
use Friendica\App;
|
||||
use Friendica\Contact\Header;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
|
@ -49,6 +50,9 @@ class InstanceV2 extends BaseApi
|
|||
/** @var IManageConfigValues */
|
||||
private $config;
|
||||
|
||||
/** @var Header */
|
||||
private $contactHeader;
|
||||
|
||||
public function __construct(
|
||||
App $app,
|
||||
L10n $l10n,
|
||||
|
@ -64,8 +68,9 @@ class InstanceV2 extends BaseApi
|
|||
) {
|
||||
parent::__construct($app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->database = $database;
|
||||
$this->config = $config;
|
||||
$this->database = $database;
|
||||
$this->config = $config;
|
||||
$this->contactHeader = new Header($config);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,7 +87,7 @@ class InstanceV2 extends BaseApi
|
|||
$version = '2.8.0 (compatible; Friendica ' . App::VERSION . ')';
|
||||
$description = $this->config->get('config', 'info');
|
||||
$usage = $this->buildUsageInfo();
|
||||
$thumbnail = new InstanceEntity\Thumbnail($this->baseUrl->withPath('images/friendica-banner.jpg'));
|
||||
$thumbnail = new InstanceEntity\Thumbnail($this->baseUrl . $this->contactHeader->getMastodonBannerPath());
|
||||
$languages = [$this->config->get('system', 'language')];
|
||||
$configuration = $this->buildConfigurationInfo();
|
||||
$registration = $this->buildRegistrationsInfo();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue