From 1e2aa0e1ca7e68ea84cc14295d8ebf8b5ef233ad Mon Sep 17 00:00:00 2001 From: sunguangming Date: Tue, 11 Nov 2025 07:25:36 +0000 Subject: [PATCH 1/2] * [bug#66436,done,0.2h] fix bug. --- module/cron/js/index.ui.js | 7 ------- module/cron/ui/index.html.php | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 module/cron/js/index.ui.js diff --git a/module/cron/js/index.ui.js b/module/cron/js/index.ui.js deleted file mode 100644 index 2dd7dca271..0000000000 --- a/module/cron/js/index.ui.js +++ /dev/null @@ -1,7 +0,0 @@ -window.refreshURL = function(obj) -{ - $this = $(obj); - $.get($this.data('href')); - loadPage($.createLink('cron', 'index')); - return false; -} diff --git a/module/cron/ui/index.html.php b/module/cron/ui/index.html.php index b015fae8ce..34d37cd031 100644 --- a/module/cron/ui/index.html.php +++ b/module/cron/ui/index.html.php @@ -17,7 +17,7 @@ foreach($crons as $cron) { $toggleLink = inlink('toggle', "id={$cron->id}&status=" . ($cron->status == 'stop' ? 'normal' : 'stop')); $toggleName = $cron->status == 'stop' ? $lang->cron->toggleList['start'] : $lang->cron->toggleList['stop']; - $actionsHtml .= html::a('###', $toggleName, '', "class='primary-500 ajaxRefresh' data-href='{$toggleLink}' onclick='refreshURL(this)'"); + $actionsHtml .= html::a($toggleLink, $toggleName, '', "class='primary-500 ajax-submit'"); } if(!empty($cron->command) and common::hasPriv('cron', 'edit')) $actionsHtml .= html::a(inlink('edit', "id={$cron->id}"), $lang->edit, '', "class='primary-500' data-toggle='modal'"); if($cron->buildin == 0 and common::hasPriv('cron', 'delete')) $actionsHtml .= html::a(inlink('delete', "id={$cron->id}"), $lang->delete, '', "class='primary-500 ajax-submit' data-confirm={$lang->cron->confirmDelete}"); From 8dc048bc7be5f2596511f47c48673fd1937e5ea4 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Tue, 11 Nov 2025 07:35:23 +0000 Subject: [PATCH 2/2] * [bug#66444,done,0.2h] fix bug. --- module/cron/control.php | 6 +++++- module/cron/ui/index.html.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/module/cron/control.php b/module/cron/control.php index fd23712815..99d1f7de54 100755 --- a/module/cron/control.php +++ b/module/cron/control.php @@ -140,7 +140,11 @@ class cron extends control session_write_close(); $execId = mt_rand(); - if($restart) $this->cron->restartCron($execId); + if($restart) + { + $this->cron->restartCron($execId); + return $this->sendSuccess(array('load' => true)); + } while(true) { diff --git a/module/cron/ui/index.html.php b/module/cron/ui/index.html.php index 34d37cd031..26b718c8e0 100644 --- a/module/cron/ui/index.html.php +++ b/module/cron/ui/index.html.php @@ -34,7 +34,7 @@ panel !empty($config->global->cron) ? set::bodyClass('p-0') : null, !empty($config->global->cron) ? set::headingActions(array ( - array('class' => 'mr-3 ajaxRefresh', 'data-href' => inlink('ajaxExec', 'restart=1'), 'text' => $lang->cron->openProcess, 'onclick' => 'refreshURL(this)'), + array('class' => 'mr-3 ajax-submit', 'url' => inlink('ajaxExec', 'restart=1'), 'text' => $lang->cron->openProcess), array('class' => 'mr-3 ajaxTurnon ajax-submit', 'url' => inlink('turnon'), 'text' => $lang->cron->turnonList[0], 'data-confirm' => $this->lang->cron->confirmTurnon), array('class' => 'mr-3 primary', 'data-toggle' => 'modal', 'url' => inlink('create'), 'text' => $lang->cron->create) )) : null,