mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 23:39:35 +00:00
Compare commits
2 commits
73253dd03c
...
64497c4c0d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64497c4c0d | ||
|
|
70bbb47850 |
4 changed files with 4 additions and 9 deletions
|
|
@ -49,7 +49,7 @@ final class SetUserTimezoneSubscriber implements EventSubscriberInterface
|
|||
}
|
||||
|
||||
//Fill with default value if needed
|
||||
if (null === $timezone && $this->localizationSettings !== '') {
|
||||
if (null === $timezone && $this->localizationSettings->timezone !== '') {
|
||||
$timezone = $this->localizationSettings->timezone;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class Element14Provider implements InfoProviderInterface
|
|||
|
||||
public function isActive(): bool
|
||||
{
|
||||
return $this->settings->storeId !== null && $this->settings->apiKey !== '';
|
||||
return trim($this->settings->apiKey) !== '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -131,11 +131,6 @@ class Element14Provider implements InfoProviderInterface
|
|||
return $result;
|
||||
}
|
||||
|
||||
private function generateProductURL($sku): string
|
||||
{
|
||||
return 'https://' . $this->store_id . '/' . $sku;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|null $datasheets
|
||||
* @return FileDTO[]|null Array of FileDTOs
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class TMEClient
|
|||
public function isUsingPrivateToken(): bool
|
||||
{
|
||||
//Private tokens are longer than anonymous ones (50 instead of 45 characters)
|
||||
return strlen($this->token) > 45;
|
||||
return strlen($this->settings->apiToken) > 45;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class TMEProvider implements InfoProviderInterface
|
|||
if ($this->tmeClient->isUsingPrivateToken()) {
|
||||
$this->get_gross_prices = false;
|
||||
} else {
|
||||
$this->get_gross_prices = $get_gross_prices;
|
||||
$this->get_gross_prices = $this->settings->grossPrices;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue