Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
easterism committed Nov 10, 2021
1 parent 54327f9 commit 57f71da
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions inc/CoreController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -255,7 +256,9 @@ public function action_modules() {
if (isset($_GET['add_mod'])) {
$mods->getAvailableEdit((int) $_GET['add_mod']);
}

$mods->getAvailable();
$mods->getRepoModules();

break;
}
Expand Down
6 changes: 3 additions & 3 deletions mod/admin/assets/js/mod.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ var modules = {
if (alertify) {
alertify.confirm('Скачать архив модуля <b>' + mod + '</b> ' + 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;
}
},
Expand Down Expand Up @@ -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() + ' <b style="color: #008000;"> Доступно обновление до v' + item.version + '</b>');
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() + '<div style="display: inline-block;" onclick="modules.updateModule(\'' + item.m_name + '\', \'' + item.version + '\', \'' + item.module_id + '\');"><img src="core2/html/' + theme + '/img/box_refresh.png" border="0" title="Обновить модуль" /></div>');
});
}
Expand Down
3 changes: 2 additions & 1 deletion mod/admin/classes/modules/InstallModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= "<pre>" . $e->getTraceAsString() . "</div>";
Expand Down
2 changes: 1 addition & 1 deletion mod/admin/classes/modules/Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 57f71da

Please sign in to comment.