Commit graph

1641 commits

Author SHA1 Message Date
Peter Goodhall
97fc54df91 Improve Clublog realtime upload error handling
Refactored variable names for clarity and added detailed logging for Clublog realtime upload results. Now resets user credentials if a 403 error is returned by the Clublog API, and includes HTTP status code in the response for better error handling.
2025-10-12 21:44:27 +01:00
Peter Goodhall
ad80e94bd3 Optimize LoTW upload with batch QSO updates
Replaces individual QSO update queries with a new mark_lotw_sent_batch() method in Logbook_model for improved performance during LoTW uploads. Updates Lotw controller to use batch updates within a transaction, reducing database load and increasing efficiency for large QSO uploads.
2025-10-11 15:17:51 +01:00
Peter Goodhall
cc3d728a1d Improve result limits and defaults in logbook and OQRS
Added validation and default values for result limits in Logbookadvanced_model and Oqrs_model to prevent invalid or empty limits. Updated views to set default selected options for result limits in logbook advanced and OQRS request pages. Also fixed SQL order by column alias typos in Logbookadvanced_model.
2025-10-11 10:27:47 +01:00
Peter Goodhall
76f002b214 Revert "Add debug output and refactor queries for LoTW and logbook"
This reverts commit 4cad75be43.
2025-10-11 00:11:46 +01:00
Peter Goodhall
4cad75be43 Add debug output and refactor queries for LoTW and logbook
Added extensive debug output and error handling to LoTW upload and download processes for easier troubleshooting. Refactored SQL queries in Logbook_model and Logbookadvanced_model to simplify and optimize data retrieval, replacing subqueries with more direct joins and query builder usage. Removed migration 217_add_performance_indexes.php.
2025-10-11 00:08:03 +01:00
Peter Goodhall
5667437160 Include COL_TIME_ON in subquery for logbook query
Added COL_TIME_ON to the DISTINCT subquery in the logbook model's SQL for improved query accuracy and potential performance benefits.
2025-10-10 23:13:10 +01:00
Peter Goodhall
2a835fea1f Optimize QSO queries with subqueries and improved joins
Refactored SQL queries in Logbook_model and Logbookadvanced_model to use subqueries for filtering and pagination, improving performance and accuracy. Updated joins and selected fields for consistency and to avoid duplicate results, especially when limiting and ordering large datasets.
2025-10-10 23:04:21 +01:00
Peter Goodhall
a27b0cf571 Add input validation and parameterized queries to OQRS
Added server-side validation for callsign and station_id inputs in Oqrs controller to prevent invalid data and potential abuse. Updated Oqrs_model to use parameterized queries instead of string concatenation, improving security against SQL injection. Callsigns are now consistently uppercased before querying.
2025-10-10 22:34:06 +01:00
Peter Goodhall
ad9e7b04e0 Improve CW macro saving and UI feedback
Enhanced macro saving with better input sanitization, error handling, and user feedback in Qso.php and Winkey.php. Updated modal forms to display save responses in a dedicated area. Improved JavaScript to handle default macro values and update button labels more robustly. Removed unnecessary WebSocket polling for CW speed in the footer.
2025-10-10 14:54:50 +01:00
Peter Goodhall
62380e0181 Expand band support and improve band display in bandmap
Added support for additional LF, MF, UHF, SHF, and EHF amateur radio bands in Bands model and bandmap view. Updated band ranges and ordering, and improved band name formatting in the bandmap UI for better clarity and consistency across all supported bands.
2025-10-04 23:05:20 +01:00
Peter Goodhall
25a03ab1fa Add optimized radio command APIs and QSY integration
Introduces an optimized API endpoint to fetch all pending radio commands for a user in a single call, along with a maintenance endpoint for cleaning up expired and old commands. Updates the documentation to reflect these new endpoints and usage patterns. Adds a QSY endpoint to Dxcluster for queuing frequency/mode commands from the bandmap, and integrates client-side JavaScript to send QSY commands to the selected radio with user feedback. Enhances backend models to support user-scoped cleanup of expired and old commands.
2025-10-04 13:34:42 +01:00
Peter Goodhall
5c63e5099e Add radio command queueing and management system
Introduces a new radio command queueing system with API endpoints and a user interface for sending, viewing, and managing radio commands. Adds migration for the radio_commands table, extends the Cat model with command-related methods, and implements new controllers and views for both API and web interfaces. This enables integration with desktop apps and provides users with tools to send, track, and cancel radio commands.
2025-10-04 11:48:48 +01:00
Peter Goodhall
5f0c95804a Add user-specific bands to bandmap and persist radio selection
The bandmap now displays only the bands configured for the current user, using a new Bands model method to retrieve and order them. The band selection dropdown in the bandmap view is dynamically generated based on user bands, with a fallback to defaults. Additionally, the selected radio is now persisted in localStorage and synchronized across selects, and the bandmap window width was adjusted for better display.
2025-10-02 17:40:49 +01:00
Peter Goodhall
dc49ac4df9
Update application/models/Emeinitials_model.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-29 22:07:22 +01:00
Peter Goodhall
09c7350f1e
Update application/models/Emeinitials_model.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-29 22:05:48 +01:00
Peter Goodhall
bda38db45a
Update application/models/Emeinitials_model.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-29 22:05:36 +01:00
Peter Goodhall
d3e23f29be
Update application/models/Emeinitials_model.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-29 22:05:28 +01:00
Peter Goodhall
6b87a10f3d Improve input validation and query safety in Emeinitials_model
Added input type checks and sanitization for band and mode parameters. Refactored SQL query construction to use CodeIgniter's Query Builder for safer, parameterized queries and proper escaping of location values. These changes enhance security and reliability of the get_initials and get_initials_data methods.
2025-09-25 16:45:55 +01:00
Jonathan Naylor
025b462516 Add an EME Initials option to the Analytics menu option for EME
operators.
2025-09-24 19:27:49 +01:00
Peter Goodhall
952007467d Add latitude and longitude to DXCC lookup results
Enhanced the DXCC lookup in Logbook_model to include latitude and longitude in the returned array. Updated API controller to utilize these new fields when returning recent QSOs and callsign lookups, providing more detailed location data in API responses.
2025-09-12 13:14:31 +01:00
Peter Goodhall
b7c065dbdd Add input validation for recent_qsos limit parameter
The recent_qsos API endpoint now validates and sanitizes the $limit parameter, enforcing a default of 10, a minimum of 1, and a maximum of 50. Additionally, get_last_qsos in Logbook_model ensures $num is always an integer to prevent SQL injection.
2025-09-09 14:25:40 +01:00
Peter Goodhall
5c4c1c2cd5 Fix SQL JOIN in get_last_qsos for station_profile
Changed the SQL query in get_last_qsos to use LEFT JOIN for station_profile instead of JOIN. This ensures that QSOs are returned even if there is no matching station_profile, improving data completeness.
2025-09-09 14:21:21 +01:00
Peter Goodhall
3f8f81364b Update Logbook_model.php 2025-09-09 14:19:51 +01:00
Peter Goodhall
72ea1e3353 Remove limit validation and update SQL join in logbook
Removed the limit parameter validation and sanitization from Api.php, delegating limit handling elsewhere. Changed the SQL query in Logbook_model.php to use LEFT JOIN for station_profile, ensuring all logbook records are included even if no matching station_profile exists.
2025-09-09 14:19:15 +01:00
Peter Goodhall
82eb5b46f2 Update REGEXP to include 'R' in col_call filter
Expanded the REGEXP pattern in SQL queries to include '/R' suffix when filtering and grouping col_call values. This ensures callsigns ending with '/R' are handled consistently with other suffixes.
2025-08-24 10:54:17 +01:00
Peter Goodhall
c7bef2db07 Normalize callsign grouping in most worked query
Updates SQL logic to group callsigns by their base identifier, stripping suffixes like /P, /MM, /AM, /QRP, /LH, and /BCN. This ensures contacts are aggregated correctly for operators using such suffixes.
2025-08-23 21:21:01 +01:00
Peter Goodhall
76f55f7f27 Add Most Worked Callsigns feature
Introduces a new 'Most Worked Callsigns' page, controller, model, and view to display callsigns worked multiple times from the active logbook. Adds language support for this feature in multiple languages and updates the navigation menu to include a link to the new page. Also includes DataTables integration and filter options for bands, modes, satellites, date range, and minimum QSOs.
2025-08-23 21:11:36 +01:00
Peter Goodhall
c6413fc755 Exclude archived LOTW certs from expiry checks
Added 'archived' => 0 to the queries in lotw_cert_expired and lotw_cert_expiring methods to ensure only active certificates are considered when checking for expired or expiring LOTW certificates.
2025-08-22 17:20:26 +01:00
Peter Goodhall
67a652bce6 Add archive status for LoTW certificates
Introduces an 'archived' boolean column to the lotw_certs table via migration, adds model and controller logic to toggle archive status, and updates the view to display and allow archiving/unarchiving of certificates. This enables users to mark LoTW certificates as archived for better management.
2025-08-22 17:15:51 +01:00
Peter Goodhall
5ff5e12890 Add public radio status option to logbooks
Introduces a new 'public_radio_status' field to station logbooks, allowing users to enable or disable the display of radio status on public logbook pages. Updates migration, controllers, model, views, and language files to support this feature and provide UI controls for toggling the option.
2025-08-22 14:52:07 +01:00
Peter Goodhall
46155ba2de Refactor Logbook_model formatting and indentation
Standardized code formatting and indentation throughout Logbook_model.php for improved readability and maintainability. No functional changes were made; only whitespace, comment alignment, and consistent brace placement were updated.
2025-08-18 14:34:32 +01:00
Peter Goodhall
adf658903b Improve DXCC ID assignment logic in Logbook_model
Refines how DXCC ID is set based on country and input values, ensuring correct assignment when country is provided and dxcc_id is zero. This helps prevent incorrect DXCC ID values during logbook entry creation.
2025-08-18 14:32:04 +01:00
Peter Goodhall
8d76abae9b Update Logbook_model.php 2025-08-17 13:37:31 +01:00
Peter Goodhall
c9490b9fc8 Handle entity type when formatting country name
Updated country name formatting to support both array and object types for the entity returned by get_entity. This ensures compatibility with different data structures and prevents errors when accessing the country name.
2025-08-17 11:32:18 +01:00
Peter Goodhall
485fa0126d Remove commented-out array_unique call
Deleted an unused, commented-out line intended to ensure unique station IDs in the logbooks_locations_array. No functional changes were made.
2025-08-15 22:31:44 +01:00
Peter Goodhall
441cc5fa61 Remove duplicate station IDs in logbook locations
Added array_unique to ensure only unique station IDs are included in the logbooks_locations_array, preventing duplicate entries.
2025-08-15 22:21:08 +01:00
Peter Goodhall
a39ef57fdd Add IOTA status handling to DXCC list
Introduces batch processing of IOTA worked/confirmed status in the controller and model, and updates the DXCC list view to display IOTA badges with status and links. Enhances visibility of IOTA information for each DXCC entry.
2025-08-14 15:36:38 +01:00
Peter Goodhall
d1bb6ff3ea Add DXCC satellite contact tracking and display
Introduces 'workedViaSatellite' status to DXCC tracking in both controller and model, including batch queries for satellite contacts. Updates the DXCC list view to show a badge when a country has been worked via satellite, improving visibility of satellite achievements.
2025-08-11 16:08:06 +01:00
Peter Goodhall
12127b8d85 Fix DXCC country matching case sensitivity
Updated SQL queries in Workabledxcc controller and model to use case-insensitive matching for DXCC country names by comparing UPPER(COL_COUNTRY) to UPPER(?). This resolves issues where country names with different cases were not matched correctly.
2025-08-11 15:12:14 +01:00
Peter Goodhall
9fb5feffe7 Make DXCC entity matching case-insensitive
Updated batchWorkedQuery and related logic to perform case-insensitive matching for DXCC entities using UPPER() in SQL WHERE conditions. This ensures entities are matched regardless of case, improving reliability of lookups.
2025-08-11 15:08:59 +01:00
Peter Goodhall
9b17ff9250 Optimize DXCC list queries and add DB indexes
Refactored Workabledxcc controller and model to batch DXCC entity and worked/confirmed status lookups for improved performance. Added migration to create composite indexes on DXCC-related columns to further speed up queries. Updated migration version to 205.
2025-08-11 14:50:56 +01:00
Peter Goodhall
625f3d70fc Refine callsign label handling on map
Added 'callsign' property to plot data in Logbook_model and updated custom_date.php to use only the 'callsign' for map labels. Simplified and removed aggressive CSS targeting for tooltip classes, ensuring consistent font size and cleaner label rendering.
2025-08-10 22:57:16 +01:00
Peter Goodhall
05834136e7 Remove unused gridsquare assignment in Logbook_model
Deleted the assignment of 'gridsquare' to the $plot array in Logbook_model.php as it was not being used elsewhere in the code.
2025-08-10 22:39:27 +01:00
Peter Goodhall
a87c4a8cb3 Add callsign label toggle to map view
Introduces a button and supporting logic to toggle callsign labels on the map using Leaflet DivIcons. Also updates the Logbook model to include gridsquare in plot data for potential label use and enhances CSS for callsign label styling.
2025-08-10 22:35:30 +01:00
Peter Goodhall
43e7d9cb9d Fix undefined index errors in statistics tables
Initialize bandcalls and modecalls arrays with default zero values in Stats.php to prevent undefined index errors. Update qsotable.php and uniquetable.php views to display 0 when mode or band totals are not set.
2025-08-10 17:44:25 +01:00
Peter Goodhall
046dc4b4ef Optimize dashboard data retrieval with consolidated queries
Replaced multiple individual queries in Dashboard controller with consolidated methods for setup counts and country statistics. Added getAllSetupCounts to Setup_model and get_countries_statistics_consolidated to Logbook_model to improve performance and reduce database load.
2025-08-09 21:24:35 +01:00
Peter Goodhall
ce7e9ee77b Refactor QSL breakdown query and result handling
Optimized SQL query by pre-calculating today's date in PHP and improved result handling by returning a consistent array with integer values. Simplified logic for default values and removed unnecessary variable assignments for better readability and maintainability.
2025-08-09 21:19:22 +01:00
Peter Goodhall
3d7258c1f5 Optimize dashboard model loading and DXCC count
Refactored Dashboard controller to load common models in the constructor and optimize dashboard options processing using associative arrays for faster lookups. Replaced DXCC entity counting logic with a new get_total_dxcc_count() method in the Dxcc model to avoid loading all records, improving performance.
2025-08-09 21:14:39 +01:00
Peter Goodhall
278a4b384c Optimize QSO statistics retrieval with consolidated query
Replaced multiple individual queries for QSO statistics in Dashboard controller with a single consolidated query in Logbook_model. This improves performance by reducing database calls when fetching today's, total, monthly, and yearly QSO counts.
2025-08-09 21:10:04 +01:00
Peter Goodhall
1951bb7f29 Fix VUCC grids query to match substring correctly
Updated the query to use or_like on COL_VUCC_GRIDS instead of applying SUBSTRING, ensuring proper matching of the grid prefix. This resolves issues with grid searches not returning expected results.
2025-08-02 22:57:26 +01:00