Skip to content

Commit

Permalink
Merge pull request wavelog#1486 from int2001/chk_qra_loaded
Browse files Browse the repository at this point in the history
Check if qra is already loaded
  • Loading branch information
int2001 authored Jan 9, 2025
2 parents 6200b74 + f79bb43 commit 782c87a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion application/views/dashboard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ function getBearing($grid = '') {
if ($grid == '') return '';
$ci =& get_instance();
if (($ci->session->userdata('user_locator') ?? '') != '') {
$ci->load->library('qra');
if(!$ci->load->is_loaded('qra')) {
$ci->load->library('qra');
}
$bearing=$ci->qra->get_bearing($ci->session->userdata('user_locator'),$grid);
return($bearing.'°');
} else {
Expand Down
4 changes: 3 additions & 1 deletion application/views/view_log/partial/log_ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ function getBearing($grid = '') {
if ($grid == '') return '';
$ci =& get_instance();
if (($ci->session->userdata('user_locator') ?? '') != '') {
$ci->load->library('qra');
if(!$ci->load->is_loaded('qra')) {
$ci->load->library('qra');
}
$bearing=$ci->qra->get_bearing($ci->session->userdata('user_locator'),$grid);
return($bearing.'°');
} else {
Expand Down

0 comments on commit 782c87a

Please sign in to comment.