some fix
This commit is contained in:
parent
13978449a2
commit
159b3933fb
@ -471,6 +471,23 @@ class ModuleService
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isShopModule(string $slug): bool
|
||||
{
|
||||
if ($this->isServerAvailable()){
|
||||
$modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug');
|
||||
|
||||
$modules_info = json_decode($modules_info->getBody()->getContents(), true);
|
||||
$mod_info = $this->getModuleInfoBySlug($slug);
|
||||
foreach ($modules_info as $mod) {
|
||||
if ($mod['slug'] === $mod_info['slug']) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getKernelModules(): array
|
||||
{
|
||||
$modules_info = [];
|
||||
|
@ -54,7 +54,7 @@ $table->addAction(function ($row, $url) use ($moduleService) {
|
||||
});
|
||||
|
||||
$table->addAction(function ($row, $url) use ($moduleService){
|
||||
if (!$moduleService->isKernelModule($row['slug'])){
|
||||
if ($moduleService->isShopModule($row['slug'])){
|
||||
if (!$moduleService->isLastVersion($row['slug'])) {
|
||||
$url = "$url/update/?slug=". $row['slug'];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user