diff --git a/application/controllers/Labels.php b/application/controllers/Labels.php index ec83929d..a871c8e2 100644 --- a/application/controllers/Labels.php +++ b/application/controllers/Labels.php @@ -98,11 +98,16 @@ class Labels extends CI_Controller { public function print($station_id) { $clean_id = xss_clean($station_id); + $this->load->model('stations'); + if ($this->stations->check_station_is_accessible($station_id)) { - $this->load->model('labels_model'); - $result = $this->labels_model->export_printrequested($clean_id); + $this->load->model('labels_model'); + $result = $this->labels_model->export_printrequested($clean_id); - $this->prepareLabel($result); + $this->prepareLabel($result); + } else { + redirect('labels'); + } } function prepareLabel($qsos, $jscall = false) {