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