From c4fa39ce5c0642c7d007138ef95af36af2b8f955 Mon Sep 17 00:00:00 2001 From: int2001 Date: Sat, 31 Aug 2024 13:46:04 +0000 Subject: [PATCH] Insert Warning if no station is linked --- application/controllers/Dashboard.php | 5 +++++ application/views/dashboard/index.php | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/application/controllers/Dashboard.php b/application/controllers/Dashboard.php index 8741cbf01..b1f5f3560 100644 --- a/application/controllers/Dashboard.php +++ b/application/controllers/Dashboard.php @@ -25,6 +25,11 @@ class Dashboard extends CI_Controller $this->load->model('logbooks_model'); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + if ($logbooks_locations_array[0] == -1) { + $data['linkedCount']=0; + } else { + $data['linkedCount']=sizeof($logbooks_locations_array); + } // Calculate Lat/Lng from Locator to use on Maps if ($this->session->userdata('user_locator')) { if(!$this->load->is_loaded('Qra')) { diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index bd4893f90..d7f8b7ee6 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -83,6 +83,14 @@ function echo_table_col($row, $name) { + + + + optionslib->get_option('dashboard_banner') != "false") { ?> = 1) { ?>