This commit is contained in:
2025-08-01 15:06:16 +03:00
parent b86b8ff923
commit 2b02ca4471
4 changed files with 17 additions and 11 deletions

View File

@@ -185,7 +185,7 @@ class ModuleService
if ($module_paths) {
$path = json_decode($module_paths->value);
foreach ($path->paths as $p) {
if (!is_dir(getConst($p))){
if (!is_dir(getConst($p))) {
$old_mask = umask(0);
mkdir(getConst($p), permissions: 0775, recursive: true);
umask($old_mask);
@@ -492,11 +492,13 @@ class ModuleService
$mod_info = $this->getModuleInfoBySlug($slug);
$currentVersion = Version::getIntVersionByString($mod_info['version']);
$currentVersion = $mod_info['version'];
foreach ($modules_info as $mod) {
$modVersion = Version::getIntVersionByString($mod['version']);
if ($mod['slug'] === $mod_info['slug'] && $modVersion <= $currentVersion) {
return true;
$modVersion = $mod['version'];
if ($mod['slug'] === $mod_info['slug']) {
if (Version::compare($currentVersion, $modVersion) >= 0) {
return true;
}
}
}
}