Set dxcluster_maxage and decont as well if not given

This commit is contained in:
int2001
2024-03-04 07:14:35 +00:00
parent ee8b87b310
commit dee54c3fdf
3 changed files with 4 additions and 4 deletions

View File

@@ -13,10 +13,10 @@ class Dxcluster extends CI_Controller {
function spots($band,$age = '', $de = '') {
if ($age == '') {
$age = $this->optionslib->get_option('dxcluster_maxage');
$age = $this->optionslib->get_option('dxcluster_maxage') ?? 60;
}
if ($de == '') {
$de = $this->optionslib->get_option('dxcluster_decont');
$de = $this->optionslib->get_option('dxcluster_decont') ?? 'EU';
}
$calls_found=$this->dxcluster_model->dxc_spotlist($band, $age, $de);
header('Content-Type: application/json');

View File

@@ -1,6 +1,6 @@
<script>
var dxcluster_provider="<?php echo base_url(); ?>index.php/dxcluster";
var dxcluster_maxage=<?php echo $this->optionslib->get_option('dxcluster_maxage'); ?>;
var dxcluster_maxage=<?php echo $this->optionslib->get_option('dxcluster_maxage') ?? 60; ?>;
var cat_timeout_interval="<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?>";
</script>

View File

@@ -1,7 +1,7 @@
<script>
var dxcluster_provider="<?php echo base_url(); ?>index.php/dxcluster";
var cat_timeout_interval="<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?>";
var dxcluster_maxage=<?php echo $this->optionslib->get_option('dxcluster_maxage'); ?>;
var dxcluster_maxage=<?php echo $this->optionslib->get_option('dxcluster_maxage') ?? 60; ?>;
var custom_date_format = "<?php echo $custom_date_format ?>";
</script>