mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Exportmap] Defaults if icons are not set in user_options
This commit is contained in:
@@ -507,12 +507,28 @@ class Visitor extends CI_Controller {
|
||||
|
||||
$this->load->model('user_options_model');
|
||||
|
||||
$result=$this->user_options_model->get_options('map_custom', null, $userid);
|
||||
$jsonout=[];
|
||||
$result = $this->user_options_model->get_options('map_custom', null, $userid);
|
||||
$jsonout = [];
|
||||
foreach($result->result() as $options) {
|
||||
if ($options->option_name=='icon') $jsonout[$options->option_key]=json_decode($options->option_value,true);
|
||||
else $jsonout[$options->option_name.'_'.$options->option_key]=$options->option_value;
|
||||
}
|
||||
|
||||
if (count($jsonout) == 0) {
|
||||
$jsonout['qso'] = array(
|
||||
"icon" => "fas fa-dot-circle",
|
||||
"color" => "#ff0000"
|
||||
);
|
||||
$jsonout['qsoconfirm'] = array(
|
||||
"icon" => "fas fa-dot-circle",
|
||||
"color" => "#00aa00"
|
||||
);
|
||||
$jsonout['station'] = array(
|
||||
"icon" => "fas fa-broadcast-tower",
|
||||
"color" => "#0000ff"
|
||||
);
|
||||
}
|
||||
|
||||
$jsonout['gridsquare_layer'] = $this->user_options_model->get_options('ExportMapOptions',array('option_name'=>'gridsquare_layer','option_key'=>$slug), $userid)->row()->option_value ?? true;
|
||||
$jsonout['path_lines'] = $this->user_options_model->get_options('ExportMapOptions',array('option_name'=>'path_lines','option_key'=>$slug), $userid)->row()->option_value ?? true;
|
||||
$jsonout['cqzone_layer'] = $this->user_options_model->get_options('ExportMapOptions',array('option_name'=>'cqzone_layer','option_key'=>$slug), $userid)->row()->option_value ?? true;
|
||||
|
||||
Reference in New Issue
Block a user