diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php
index 1a0c8226..ee300a5d 100644
--- a/application/controllers/Logbookadvanced.php
+++ b/application/controllers/Logbookadvanced.php
@@ -94,6 +94,7 @@ class Logbookadvanced extends CI_Controller {
'propmode' => xss_clean($this->input->post('propmode')),
'gridsquare' => xss_clean($this->input->post('gridsquare')),
'state' => xss_clean($this->input->post('state')),
+ 'qsoresults' => xss_clean($this->input->post('qsoresults')),
);
$qsos = [];
diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php
index 232b38d2..004f298f 100644
--- a/application/models/Logbookadvanced_model.php
+++ b/application/models/Logbookadvanced_model.php
@@ -114,11 +114,7 @@ class Logbookadvanced_model extends CI_Model {
$where = "AND $where";
}
- if ($where === '') {
- $limit = 250;
- } else {
- $limit = 1000;
- }
+ $limit = $searchCriteria['qsoresults'];
$sql = "
SELECT *
diff --git a/application/views/logbookadvanced/index.php b/application/views/logbookadvanced/index.php
index 5e8f4066..dec78643 100644
--- a/application/views/logbookadvanced/index.php
+++ b/application/views/logbookadvanced/index.php
@@ -101,7 +101,7 @@
-
+
+
+
+
+
diff --git a/assets/js/sections/logbookadvanced.js b/assets/js/sections/logbookadvanced.js
index f80d638f..1598225c 100644
--- a/assets/js/sections/logbookadvanced.js
+++ b/assets/js/sections/logbookadvanced.js
@@ -156,6 +156,7 @@ $(document).ready(function () {
propmode: this.selectPropagation.value,
gridsquare: this.gridsquare.value,
state: this.state.value,
+ qsoresults: this.qsoResults.value
},
dataType: 'json',
success: function (data) {
diff --git a/src/QSLManager/QSO.php b/src/QSLManager/QSO.php
index 196241fb..4d08859c 100644
--- a/src/QSLManager/QSO.php
+++ b/src/QSLManager/QSO.php
@@ -162,10 +162,10 @@ class QSO
$this->QSLSentVia = ($data['COL_QSL_SENT_VIA'] === null) ? '' : $data['COL_QSL_SENT_VIA'];
$this->QSLVia = ($data['COL_QSL_VIA'] === null) ? '' : $data['COL_QSL_VIA'];
- $this->cqzone = $data['COL_CQZ'];
- $this->state = $data['COL_STATE'];
- $this->dxcc = $data['COL_COUNTRY'];
- $this->iota = $data['COL_IOTA'];
+ $this->cqzone = ($data['COL_CQZ'] === null) ? '' : $data['COL_CQZ'];
+ $this->state = ($data['COL_STATE'] === null) ? '' :$data['COL_STATE'];
+ $this->dxcc = ($data['COL_COUNTRY'] === null) ? '' :$data['COL_COUNTRY'];
+ $this->iota = ($data['COL_IOTA'] === null) ? '' :$data['COL_IOTA'];
}
/**