From 116041ba113f6fb2d0e37f85f6387bba38e0aa94 Mon Sep 17 00:00:00 2001 From: phl0 Date: Mon, 24 Mar 2025 08:47:49 +0100 Subject: [PATCH] Fix cron output and whitespace --- application/controllers/Update.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/application/controllers/Update.php b/application/controllers/Update.php index 27984437a..6be38e426 100644 --- a/application/controllers/Update.php +++ b/application/controllers/Update.php @@ -489,20 +489,20 @@ class Update extends CI_Controller { $this->load->view('interface_assets/footer'); } - public function update_hamsofnote() { - $this->load->model('cron_model'); - $this->cron_model->set_last_run($this->router->class.'_'.$this->router->method); - $this->load->model('Update_model'); - $bodyData['hamsofnote'] = $this->Update_model->update_hams_of_note(); - if ($this->session->userdata('user_type') == '99') { - $data['page_title'] = __("Update of Hams of Note"); - $this->load->view('interface_assets/header', $data); - $this->load->view('update/hamsofnote', $bodyData); - $this->load->view('interface_assets/footer'); - } else { - echo $bodyData['hamsofnote']; - } - } + public function update_hamsofnote() { + $this->load->model('cron_model'); + $this->cron_model->set_last_run($this->router->class.'_'.$this->router->method); + $this->load->model('Update_model'); + $bodyData['hamsofnote'] = $this->Update_model->update_hams_of_note(); + if ($this->session->userdata('user_type') == '99') { + $data['page_title'] = __("Update of Hams of Note"); + $this->load->view('interface_assets/header', $data); + $this->load->view('update/hamsofnote', $bodyData); + $this->load->view('interface_assets/footer'); + } else { + echo "Hams of note updated. Inserted ".count($bodyData['hamsofnote'])." records."; + } + } function version_check() { // set the last run in cron table for the correct cron id