diff --git a/inc/CoreController.php b/inc/CoreController.php index 3b184b53..56a723af 100644 --- a/inc/CoreController.php +++ b/inc/CoreController.php @@ -206,6 +206,7 @@ public function action_modules() { $mods = new Modules(); if (empty($_POST)) { $this->printJs("core2/mod/admin/assets/js/mod.js"); + $this->printJs("core2/mod/admin/assets/js/gl.js"); } $panel = new \Panel('tab'); @@ -255,7 +256,9 @@ public function action_modules() { if (isset($_GET['add_mod'])) { $mods->getAvailableEdit((int) $_GET['add_mod']); } + $mods->getAvailable(); + $mods->getRepoModules(); break; } diff --git a/mod/admin/assets/js/mod.js b/mod/admin/assets/js/mod.js index f18a3286..2c3e9dd7 100644 --- a/mod/admin/assets/js/mod.js +++ b/mod/admin/assets/js/mod.js @@ -30,12 +30,12 @@ var modules = { if (alertify) { alertify.confirm('Скачать архив модуля ' + mod + ' ' + v + '?', function(e) { if (e) { - loadPDF('index.php?module=admin&action=modules&tab_mod=2&download_mod=' + modId); + loadPDF('index.php?module=admin&action=modules&tab=available&download_mod=' + modId); } else return false; }); } else { if (confirm('Скачать архив модуля ' + mod + ' ' + v + '?')) { - loadPDF('index.php?module=admin&action=modules&tab_mod=2&download_mod=' + modId); + loadPDF('index.php?module=admin&action=modules&tab=available&download_mod=' + modId); } else return false; } }, @@ -109,7 +109,7 @@ var modules = { var obj = $('td[title=' + item.m_id + ']'); var obj_ver = obj.next().next().next(); obj_ver.html(obj_ver.html() + ' Доступно обновление до v' + item.version + ''); - var obj_do = obj.next().next().next().next().next().next().next(); + var obj_do = obj.next().next().next().next().next().next(); obj_do.html(obj_do.html() + '
'); }); } diff --git a/mod/admin/classes/modules/InstallModule.php b/mod/admin/classes/modules/InstallModule.php index 54d709a0..71649a28 100644 --- a/mod/admin/classes/modules/InstallModule.php +++ b/mod/admin/classes/modules/InstallModule.php @@ -2028,7 +2028,8 @@ public function checkModUpdates($mod_id) { $this->db->commit(); - } catch (\Exception $e) { + } + catch (\Exception $e) { $this->db->rollBack(); $msg = $e->getMessage(); if ($this->config->debug->on) $msg .= "" . $e->getTraceAsString() . ""; diff --git a/mod/admin/classes/modules/Modules.php b/mod/admin/classes/modules/Modules.php index 6268a6ae..d29c07cb 100755 --- a/mod/admin/classes/modules/Modules.php +++ b/mod/admin/classes/modules/Modules.php @@ -39,7 +39,7 @@ public function getAvailableEdit(Int $avail_id) { FROM core_available_modules WHERE id = 0"; if ($avail_id < 0) { - \Tool::printJs("core2/mod/admin/assets/js/gl.js", true); + $edit->addControl("GitLab релиз", "MODAL", array( 'disabled' => 'disabled', 'size' => '40',