This commit is contained in:
Билай Станислав 2025-01-24 11:29:04 +03:00
parent b6ba8f8718
commit 2b2c99cd17

View File

@ -73,7 +73,6 @@ class ThemeService
$dependenceArray = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/get_all_dependencies/' . $themeInfo['slug']); $dependenceArray = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/get_all_dependencies/' . $themeInfo['slug']);
$dependenceArray = json_decode($dependenceArray->getBody()->getContents(), true); $dependenceArray = json_decode($dependenceArray->getBody()->getContents(), true);
foreach ($dependenceArray as $depend) { foreach ($dependenceArray as $depend) {
if (!$this->moduleService->isInstall($depend)) { if (!$this->moduleService->isInstall($depend)) {
if (!$this->moduleShopService->existsInModuleShop($depend)) { if (!$this->moduleShopService->existsInModuleShop($depend)) {
@ -83,7 +82,6 @@ class ThemeService
} }
} }
if (!$this->moduleService->recursiveActivateDependencies($dependenceArray)){ if (!$this->moduleService->recursiveActivateDependencies($dependenceArray)){
return false; return false;
} }
@ -91,8 +89,6 @@ class ThemeService
$activeTheme->value = getConst($theme); $activeTheme->value = getConst($theme);
$activeTheme->save(); $activeTheme->save();
return true; return true;
} }
public function getActiveThemeInfo(): false|array|string public function getActiveThemeInfo(): false|array|string