[Web] Allow mins_interval of max 1 month for sync jobs, fixes #3642
This commit is contained in:
parent
8d03834549
commit
2d049f37da
@ -1243,8 +1243,8 @@ if (isset($_SESSION['mailcow_cc_role'])) {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-sm-2" for="mins_interval"><?=$lang['edit']['mins_interval'];?></label>
|
<label class="control-label col-sm-2" for="mins_interval"><?=$lang['edit']['mins_interval'];?></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="number" class="form-control" name="mins_interval" min="1" max="3600" value="<?=htmlspecialchars($result['mins_interval'], ENT_QUOTES, 'UTF-8');?>" required>
|
<input type="number" class="form-control" name="mins_interval" min="1" max="43800" value="<?=htmlspecialchars($result['mins_interval'], ENT_QUOTES, 'UTF-8');?>" required>
|
||||||
<small class="help-block">1-3600</small>
|
<small class="help-block">1-43800</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -352,7 +352,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!filter_var($mins_interval, FILTER_VALIDATE_INT, array('options' => array('min_range' => 1, 'max_range' => 3600)))) {
|
if (!filter_var($mins_interval, FILTER_VALIDATE_INT, array('options' => array('min_range' => 1, 'max_range' => 43800)))) {
|
||||||
$_SESSION['return'][] = array(
|
$_SESSION['return'][] = array(
|
||||||
'type' => 'danger',
|
'type' => 'danger',
|
||||||
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||||
@ -1650,7 +1650,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
|||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!filter_var($mins_interval, FILTER_VALIDATE_INT, array('options' => array('min_range' => 1, 'max_range' => 3600)))) {
|
if (!filter_var($mins_interval, FILTER_VALIDATE_INT, array('options' => array('min_range' => 1, 'max_range' => 43800)))) {
|
||||||
$_SESSION['return'][] = array(
|
$_SESSION['return'][] = array(
|
||||||
'type' => 'danger',
|
'type' => 'danger',
|
||||||
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||||
|
@ -3,7 +3,7 @@ function init_db_schema() {
|
|||||||
try {
|
try {
|
||||||
global $pdo;
|
global $pdo;
|
||||||
|
|
||||||
$db_version = "12052020_1828";
|
$db_version = "08072020_1932";
|
||||||
|
|
||||||
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
|
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
|
||||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
@ -564,7 +564,7 @@ function init_db_schema() {
|
|||||||
"password1" => "VARCHAR(255) NOT NULL",
|
"password1" => "VARCHAR(255) NOT NULL",
|
||||||
"exclude" => "VARCHAR(500) NOT NULL DEFAULT ''",
|
"exclude" => "VARCHAR(500) NOT NULL DEFAULT ''",
|
||||||
"maxage" => "SMALLINT NOT NULL DEFAULT '0'",
|
"maxage" => "SMALLINT NOT NULL DEFAULT '0'",
|
||||||
"mins_interval" => "VARCHAR(50) NOT NULL DEFAULT '0'",
|
"mins_interval" => "SMALLINT UNSIGNED NOT NULL DEFAULT '0'",
|
||||||
"maxbytespersecond" => "VARCHAR(50) NOT NULL DEFAULT '0'",
|
"maxbytespersecond" => "VARCHAR(50) NOT NULL DEFAULT '0'",
|
||||||
"port1" => "SMALLINT UNSIGNED NOT NULL",
|
"port1" => "SMALLINT UNSIGNED NOT NULL",
|
||||||
"enc1" => "ENUM('TLS','SSL','PLAIN') DEFAULT 'TLS'",
|
"enc1" => "ENUM('TLS','SSL','PLAIN') DEFAULT 'TLS'",
|
||||||
|
@ -457,8 +457,8 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-sm-2" for="mins_interval"><?=$lang['add']['mins_interval'];?></label>
|
<label class="control-label col-sm-2" for="mins_interval"><?=$lang['add']['mins_interval'];?></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="number" class="form-control" name="mins_interval" min="1" max="3600" value="20" required>
|
<input type="number" class="form-control" name="mins_interval" min="1" max="43800" value="20" required>
|
||||||
<small class="help-block">1-3600</small>
|
<small class="help-block">1-43800</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -53,8 +53,8 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-sm-2" for="mins_interval"><?=$lang['add']['mins_interval'];?></label>
|
<label class="control-label col-sm-2" for="mins_interval"><?=$lang['add']['mins_interval'];?></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="number" class="form-control" name="mins_interval" min="1" max="3600" value="20" required>
|
<input type="number" class="form-control" name="mins_interval" min="1" max="43800" value="20" required>
|
||||||
<small class="help-block">1-3600</small>
|
<small class="help-block">1-43800</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
Loading…
Reference in New Issue
Block a user