Commit graph

26 commits

Author SHA1 Message Date
Peter Goodhall
4440582389 Sanitize IDs and migrate SQL to Query Builder
Replace ad-hoc xss_clean calls with explicit casting and stronger type checks for ID/parameter handling, and convert many raw SQL strings to CodeIgniter Query Builder usage. Added normalize_location_ids helpers (Activators_model, Oqrs_model) to safely parse location lists and used where_in/parameter binding/escaping to avoid injection and improve maintainability. Also adjusted session user_id handling, improved LIKE/DATE/TIMEDIFF usage, and tightened several model/controller methods (Labels, Activators, Bands, Contesting, Labels_model, Modes, Oqrs_model, Qsl_model, Setup_model, Sstv_model, User_model) for safer, clearer DB queries and inputs.
2026-06-24 22:15:31 +01:00
Peter Goodhall
e3c602127a Use CI query builder for safer DB queries
Replace concatenated SQL with CodeIgniter query builder across models to improve safety and readability. Changes in Cat, Contesting_model and Oqrs_model convert raw SQL strings into active-record calls, add integer casting for ID/station values, use select/from/join/where/order_by/get patterns, and simplify delete/query flows. Affected methods include radio_status, multiple contest-related selects/inserts/deletes, and several oqrs/station_profile queries.
2026-06-24 22:10:20 +01:00
Peter Goodhall
f5e3aac0d0 Cast IDs to int; use query builder
Normalize incoming ID parameters to integers and replace concatenated/raw SQL with CodeIgniter query builder. Controllers (Contesting.php, Themes.php) now cast $id to (int) instead of using xss_clean; models (Contesting_model.php, Themes_model.php) cast $id and use $this->db->where()/get()/select() to build queries. This improves type safety and reduces risk of injection while using more idiomatic CI DB APIs.
2026-06-24 22:08:30 +01:00
Peter Goodhall
4c1dd7a42d Add Cabrillo export modal & format improvements
Add a full Cabrillo export workflow and harden Cabrillo/QSO formatting. Introduces a modal UI to export contest logs (new button + modal form with fields for location, category time, operators, club, soapbox, date range and other Cabrillo categories). Controller updates pass the new fields to the export action. Cabrilloformat library extended to accept and emit LOCATION and CATEGORY-TIME, improve header field ordering and presence checks, map ADIF modes to the five Cabrillo modes (CW/PH/FM/RY/DG), fix a band label (2.4G -> 2.3G), and emit placeholders for missing received exchanges to preserve column alignment. Contesting_model: more robust date parsing with UTC fallback, ensure session QSO marker only persists when timestamp valid, and build start timestamp when LIVE mode omits start_date/start_time. Frontend JS: setSession() now returns the ajax promise so callers can await it; several callers updated to await setSession and re-fetch session data before refreshing the QSO table; restore full table search on callsign blur and when suggestions are cleared. Misc: small form/input fixes (club field type, default overlay option) and additional server-supplied data loaded into the contesting view (active station id, contest session, station profile). These changes add required Cabrillo fields for certain contests and make exports and session handling more reliable.
2026-03-27 00:04:21 +00:00
Peter Goodhall
3a8f424dc0
Contest "copy exchange to" 2024-04-02 13:44:08 +01:00
DJ3CE
3d22e3c949 Implement contesting copy-exchange-to(-nearly)-anything
- in contest-session, the (numeric-)id of the selected 'copy' is saved,
  compatible with the previous DOK-copy.
- UI changes
- Logbook_model enhancements
- Translation additions
2024-03-27 11:31:39 +01:00
DJ3CE
f6681482ab Post-contest-logging focus and qso-list fix 2024-03-27 11:29:58 +01:00
Peter Goodhall
4128425f2d Resolves issue when no previous contest qsos have been set and table was empty
Should resolve #2919 #2139
2024-01-14 18:04:46 +00:00
int2001
48838c4365
Added absolute Time of last-qso to "worked before" banner 2023-12-31 06:55:25 +00:00
int2001
70db88b521
Added time of "Worked before" in Contest-Section 2023-12-30 20:17:24 +00:00
phl0
83b3261034
Fix lookups for empty contest sessions 2023-11-09 15:11:36 +01:00
Andreas Kristiansen
383602c482
Merge pull request #2063 from AndreasK79/cabrillo_export
Cabrillo export
2023-04-18 07:57:28 +02:00
Andreas
bae96ce1e6 [Cabrillo export] Added better date selection 2023-04-12 15:01:53 +02:00
Andreas
ef3c92d9cf [Cabrillo export] Added station location 2023-04-12 14:24:03 +02:00
Andreas
1249076d6d [Cabrillo export] Fixed tablename 2023-04-12 13:25:15 +02:00
Andreas
3a415a5587 [Cabrillo export] Added contest export for cabrillo 2023-04-12 11:58:47 +02:00
Andreas
61af11addf [Contest logging] Always set copytodok to 0 when blank. Thanks @phl0 2023-04-11 08:14:18 +02:00
Andreas
b481fdbb38 [Contest logging] Moved contest session from local storage to database 2023-04-10 18:54:24 +02:00
Andreas Kristiansen
7d404c31db
Merge branch 'cloudlog8' into mergesolve 2021-11-13 20:00:48 +01:00
Andreas
1b2a88b355 Removed all constructors in models, since this doesn't work in never CodeIgniter 2021-11-06 20:24:28 +01:00
Andreas
36d1b75484 [Contesting] Implemented dupecheck 2021-10-24 16:48:23 +02:00
Andreas
93b6cba00e [Contests] Added buttons for activate/deactivate all 2021-10-23 19:44:41 +02:00
Andreas
e6387c92a5 [Contesting] Spacebar jumping is now working. Filling of QSO table is working. Logging the QSO and exchanges correct is working. 2021-08-13 12:47:17 +02:00
Andreas
adaa7f3f8a [Contesting] Contests can be added/edited/deleted inside Cloudlog. Used for choosing Contest in Contest Logging 2021-02-12 23:27:08 +01:00
Andreas
9e790340d7 [Contesting] Restoring QSO table. 2020-12-28 19:55:51 +01:00
Andreas
e83e7340f5 [Contest logging] Started work on the logging form. 2020-11-08 10:46:08 +01:00