Skip to content
Permalink
Browse files

fix restart cycle

  • Loading branch information...
Anisan committed Dec 29, 2018
1 parent 8cc11a5 commit 934462f5a1f0cd391959070dbb9945bd272feafb
Showing with 9 additions and 6 deletions.
  1. +9 −6 modules/telegram/telegram.class.php
@@ -152,12 +152,15 @@ function log($message) {
*/
function admin(&$out) {
$this->getConfig();
if (!gg('cycle_telegramRun')) {
setGlobal('cycle_telegramRun',1);
}
if ((time() - gg('cycle_telegramRun')) < $this->config['TLG_TIMEOUT']*2 ) {
$out['CYCLERUN'] = 1;
} else {
$out['CYCLERUN'] = 0;
}
$out['CYCLERUN'] = 1;
} else {
$out['CYCLERUN'] = 0;
}
global $getlog;
global $filter;
@@ -316,7 +319,7 @@ function admin(&$out) {
$this->log("Save config");
if (!$this->config['TLG_WEBHOOK'])
{
setGlobal('cycle_telegram','restart');
setGlobal('cycle_telegramControl','restart');
$this->log("Init cycle restart");
}
$this->redirect("?tab=".$this->tab);

0 comments on commit 934462f

Please sign in to comment.
You can’t perform that action at this time.