From e79a0eaf60ece6047b91c5a1b9641db330fc686e Mon Sep 17 00:00:00 2001 From: int2001 Date: Sun, 8 Jun 2025 07:50:16 +0000 Subject: [PATCH] 5k Limit as well for old queries --- application/controllers/Search.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/controllers/Search.php b/application/controllers/Search.php index 99878f4fc..e13c95bdc 100644 --- a/application/controllers/Search.php +++ b/application/controllers/Search.php @@ -119,6 +119,9 @@ class Search extends CI_Controller { $sql = $sql[0]->query; if (stristr($sql, 'select') && !stristr($sql, 'delete') && !stristr($sql, 'update')) { + if (!(strpos(strtolower($sql),'limit'))) { + $sql.=' limit 5000'; + } $data['results'] = $this->db->query($sql); $this->load->view('search/search_result_ajax', $data);