From 6d533bc0b520c8b8439085962f9864f5375e757f Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Tue, 4 Nov 2025 11:29:40 +0100 Subject: [PATCH] 1K limit --- application/controllers/Stationsetup.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/controllers/Stationsetup.php b/application/controllers/Stationsetup.php index fa2083b15..a869b8edb 100644 --- a/application/controllers/Stationsetup.php +++ b/application/controllers/Stationsetup.php @@ -563,6 +563,12 @@ class Stationsetup extends CI_Controller { $imported = 0; foreach ($locations as $loc) { + if ($imported >= 1000){ + $this->output + ->set_content_type('application/json') + ->set_output(json_encode(['status' => 'success', 'message' => "$imported locations imported. Maximum limit of 1000 locations reached."])); + return; // Prevent importing more than 1000 locations at once + } // Data for station_profile $dbdata = [ 'station_active' => 0,