From 59a8eb4def052596b3fafa85ba81821297bfd030 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 16 Feb 2013 14:48:27 +0000 Subject: [PATCH] Added trim to callsign, qra, iota fields --- application/models/logbook_model.php | 12 ++++++------ application/views/statistics/index.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application/models/logbook_model.php b/application/models/logbook_model.php index 0b1b922e..8507d664 100644 --- a/application/models/logbook_model.php +++ b/application/models/logbook_model.php @@ -34,8 +34,8 @@ class Logbook_model extends CI_Model { $data = array( 'COL_TIME_ON' => $datetime, 'COL_TIME_OFF' => $datetime, - 'COL_CALL' => strtoupper($this->input->post('callsign')), - 'COL_BAND' => $this->input->post('band'), + 'COL_CALL' => strtoupper(trim($this->input->post('callsign'))), + 'COL_BAND' => trim($this->input->post('band')), 'COL_FREQ' => $this->input->post('freq_display'), 'COL_MODE' => $this->input->post('mode'), 'COL_RST_RCVD' => $this->input->post('rst_recv'), @@ -57,7 +57,7 @@ class Logbook_model extends CI_Model { 'COL_OPERATOR' => $this->session->userdata('user_callsign'), 'COL_QTH' => $this->input->post('qth'), 'COL_PROP_MODE' => $prop_mode, - 'COL_IOTA' => $this->input->post('iota_ref'), + 'COL_IOTA' => trim($this->input->post('iota_ref')), 'COL_MY_GRIDSQUARE' => strtoupper($locator), 'COL_DISTANCE' => "0", 'COL_FREQ_RX' => 0, @@ -168,16 +168,16 @@ class Logbook_model extends CI_Model { $data = array( 'COL_TIME_ON' => $this->input->post('time_on'), 'COL_TIME_OFF' => $this->input->post('time_off'), - 'COL_CALL' => strtoupper($this->input->post('callsign')), + 'COL_CALL' => strtoupper(trim($this->input->post('callsign'))), 'COL_BAND' => $this->input->post('band'), 'COL_FREQ' => $this->input->post('freq'), 'COL_MODE' => $this->input->post('mode'), 'COL_RST_RCVD' => $this->input->post('rst_recv'), 'COL_RST_SENT' => $this->input->post('rst_sent'), - 'COL_GRIDSQUARE' => $this->input->post('locator'), + 'COL_GRIDSQUARE' => strtoupper(trim($this->input->post('locator'))), 'COL_COMMENT' => $this->input->post('comment'), 'COL_NAME' => $this->input->post('name'), - 'COL_COUNTRY' => $this->input->post('country'), + 'COL_COUNTRY' => $this->input->post('country'), 'COL_SAT_NAME' => $this->input->post('sat_name'), 'COL_SAT_MODE' => $this->input->post('sat_mode'), 'COL_QSLSDATE' => date('Y-m-d'), diff --git a/application/views/statistics/index.php b/application/views/statistics/index.php index dead1024..0181c1fb 100644 --- a/application/views/statistics/index.php +++ b/application/views/statistics/index.php @@ -77,7 +77,7 @@ google.setOnLoadCallback(barchart); function barchart() { var data = google.visualization.arrayToDataTable([ - ['Year', 'QSO'], + ['Year', 'QSOs'], result() as $qso_numbers) { ?> ['year; ?>', total; ?>],