Commit graph

1681 commits

Author SHA1 Message Date
Peter Goodhall
cc1b92cb13 Fix DXCC ID assignment in logbook model
Corrects the logic for assigning DXCC ID when the country is set and dxcc_id is 0 by fetching the DXCC ID from the callsign lookup. This ensures the correct DXCC ID is used in these cases.
2026-01-08 14:29:59 +00:00
Peter Goodhall
6080db9e23 Improve distances UI and add caching for statistics
Refactored the distances filter form for better layout and usability, added a reset button, and enhanced the display of statistics with metric cards. Implemented session-based caching in Distances_model to reduce repeated calculations and speed up responses. Updated JavaScript to auto-load charts, show loading spinners, and improve error handling and dynamic UI updates.
2026-01-06 22:48:26 +00:00
Peter Goodhall
d597e2e83b Add DXCC statistics and continent breakdown
Introduces DXCC statistics and continent breakdown features to the awards page, including new controller endpoints for DXCC QSOs, QSOs by status, and continent QSOs. Updates the DXCC model to provide continent and milestone statistics, and enhances the awards view with summary cards, continent progress, table search, sorting, and modal dialogs for QSO details.
2026-01-06 22:34:05 +00:00
Peter Goodhall
e572821b96 Add Personal Propagation Advisor feature
Introduces the Personal Propagation Advisor, allowing users to analyze their own QSO data to determine the best times, bands, and modes for working specific DXCC entities. Adds a new controller, model methods, view, JavaScript, and language strings in multiple languages. Updates navigation and footer to support the new feature.
2026-01-05 22:14:00 +00:00
Peter Goodhall
44fbfd4aab Pass second parameter to getAdifLine in Logbook_model
Updated the call to getAdifLine in Logbook_model to include a second parameter set to true. This may enable additional functionality or formatting in the ADIF line generation for Clublog integration.
2026-01-03 21:34:27 +00:00
Peter Goodhall
b368cba876 Enforce write permissions for QSO modifications
Replaced checks for QSO accessibility with stricter write permission checks across controllers and models. Added a new check_qso_is_writable method to Logbook_model to ensure only authorized users can modify or delete QSOs, including shared logbook scenarios. Updated QSO, Qsl_model, and Sstv_model to use the new permission logic for all write operations.
2025-12-23 11:06:19 +00:00
Peter Goodhall
d9e0fe0900 Improve QSO access checks and error handling
Enhanced the QSO access logic to allow access if the QSO belongs to the user or is part of a user's active logbook, including shared permissions. Added a guard in the controller to prevent accessing missing or inaccessible QSOs, redirecting with a notice if access is denied.
2025-12-20 22:03:12 +00:00
Peter Goodhall
1583590ecf Improve logbook ownership checks and permissions
Updated Logbooks controller to use profile_clean for station lookup and added a notice for missing stations. Enhanced Setup_model to count logbooks a user owns or has permissions for, ensuring accurate logbook statistics for users with shared access.

Fixes #3389
2025-12-20 21:50:21 +00:00
Peter Goodhall
7bdd3386b7 Use latest LoTW upload per callsign in joins
Replaces direct joins to lotw_users with subqueries that select the latest (MAX) lastupload per callsign in Distances_model, Logbook_model, and Logbookadvanced_model. This ensures only the most recent LoTW upload per callsign is joined, improving data accuracy and preventing duplicate join results.
2025-12-02 22:47:19 +00:00
Peter Goodhall
307c87ea48 Optimize LOTW user join in logbook query
Replaces direct join with lotw_users table by joining a subquery that selects the latest lastupload per callsign. This improves performance and ensures only the most recent LOTW upload date is included for each callsign.
2025-12-02 22:43:19 +00:00
Peter Goodhall
0848a9b4c0 Add open registration and public signup feature
Introduces open registration settings in the options area, allowing administrators to enable or disable public user signup. Adds a registration options page, updates sidebar navigation, and implements a public signup form and controller logic. Also refines user model to ensure correct data types for user fields and updates language strings for registration. The login page now links to signup when open registration is enabled.
2025-12-02 18:10:37 +00:00
Peter Goodhall
88f328581b Added Awards Settings 2025-12-02 13:32:11 +00:00
Peter Goodhall
2236d4360b Ensure user callsign is stored in uppercase
Updated User_model to store user_callsign in uppercase using strtoupper when creating or updating users. Also added a style to the edit form input to visually enforce uppercase entry for callsign.
2025-11-24 14:22:34 +00:00
Peter Goodhall
a5dc268b72 Handle unauthenticated user in Logbooks_model queries
Added checks to return empty results when no user is logged in, preventing SQL errors and ensuring consistent behavior for unauthenticated access in logbook-related queries.
2025-11-23 10:57:27 +00:00
Peter Goodhall
fb4f3877de Implement natural callsign sorting in label queries
Replaces standard callsign ordering with natural sorting by splitting callsigns into prefix, number (padded), and suffix. This improves the order of QSO label results for better readability and organization.
2025-11-22 17:21:00 +00:00
Peter Goodhall
476b59abc4 Add logbook sharing email notification
Introduces email notifications when a logbook is shared with a new user, including a new email template and improved error logging for email sending. Also enhances the test email UI with a loading spinner and updates error messages for better clarity.
2025-11-22 15:09:44 +00:00
Peter Goodhall
f2b8a3eeaa Redirect to edit page after logbook creation
After creating a new logbook, users are now redirected to the edit page for the newly created logbook instead of the logbooks list. The add method in Logbooks_model now returns the new logbook ID to support this change.
2025-11-22 14:38:53 +00:00
Peter Goodhall
e6e1ac4fd8 Add 'B' to csadditions regex for DXCC lookup
Updated the csadditions regular expression in Logbook_model.php and Dxcc.php to include 'B' as a valid suffix for DXCC lookup and call sign parsing. This change ensures callsigns with '/B' are properly recognized in DXCC-related functions.
2025-11-21 17:50:32 +00:00
Peter Goodhall
b287af642b Add multi-user logbook sharing and permissions
Introduces logbook sharing with read, write, and admin permission levels via a new station_logbooks_permissions table and related migration. Updates controllers, models, and views to support managing collaborators, restricts sensitive actions to owners/admins, and adds UI for sharing management. Also adds user lookup by callsign and improves logbook/station location access logic.
2025-11-19 15:37:34 +00:00
Peter Goodhall
d9e0504e7a Improve error handling for DXpedition data fetch
Added error checks when fetching DXpedition data in Workabledxcc_model and updated Dashboard controller to only sort valid records. The upcoming_dxccs view now displays a warning message if an error occurs, improving user feedback and robustness.
2025-11-18 13:14:41 +00:00
Peter Goodhall
45528ee293 Add new gridsquares by band to monthly report
Introduces per-band breakdown of new gridsquares in the monthly report, including model, controller, and view changes. The report now displays new gridsquares grouped by band, as well as improved details for new DXCCs and satellite activity breakdowns.
2025-11-14 17:49:25 +00:00
Peter Goodhall
4e657094f8 Separate SAT/EME DXCC reporting from band-based stats
Updated Monthlyreport_model to distinguish Satellite and EME DXCC entities from terrestrial bands, grouping them separately and including callsign/mode details. Modified report view to filter and display terrestrial, satellite, and EME DXCCs in distinct sections with improved formatting and additional QSO info.
2025-11-14 17:40:27 +00:00
Peter Goodhall
1ee55d3739 Add mode and satellite info to monthly report
Enhances the monthly report to display QSO mode and satellite name for new DXCCs and grids. Adds a satellite breakdown table showing QSOs per satellite and their percentage of total satellite QSOs. Improves data structure in the model to support these features and updates the view for clearer presentation.
2025-11-14 17:33:08 +00:00
Peter Goodhall
f7e03cc52b Optimize grid 'new' checks with historical data caching
Replaced repeated database queries for grid 'new' checks with pre-built in-memory caches, significantly improving performance by reducing hundreds of queries to a few. Added build_historical_caches() to load all relevant historical grid data at once and refactored is_grid_new, is_grid_new_for_prop, and is_grid_new_for_hf to use these caches for instant lookups.
2025-11-14 17:13:11 +00:00
Peter Goodhall
36ae819a22 Show callsign for new DXCC and grid entries in report
Adds callsign information to new DXCC and grid entries in the monthly report, both in the backend data and frontend display. Also updates JSON export to include a filename for downloads. This provides more detailed context for each new entity or grid worked during the month.
2025-11-14 17:11:18 +00:00
Peter Goodhall
4449a91634 Improve grid newness checks for VUCC and gridsquare
Refactored is_grid_new, is_grid_new_for_prop, and is_grid_new_for_hf to more accurately check for new grids by matching the first 4 characters of COL_GRIDSQUARE and parsing COL_VUCC_GRIDS. This ensures grids are not considered new if present in either field, improving report accuracy.
2025-11-14 16:54:00 +00:00
Peter Goodhall
ad6dd809bb Normalize gridsquare processing to 4 characters
Updated gridsquare and VUCC grid handling to consistently use only the first 4 characters in all relevant methods. Also modified country selection to use MAX(COL_COUNTRY) and group by COL_DXCC for improved aggregation.
2025-11-14 16:46:58 +00:00
Peter Goodhall
03390ed2e8 Optimize DXCC entity queries in monthly report model
Replaced use of distinct() with MAX(COL_COUNTRY) in select statements to group DXCC entities more efficiently. This change improves query performance and ensures correct aggregation of country names in monthly report generation.
2025-11-14 16:41:55 +00:00
Peter Goodhall
66e2376ac4 Add monthly report feature for amateur radio activity
Introduces a new Monthlyreport controller, model, and views to generate comprehensive monthly activity reports for amateur radio logbooks. The feature includes summary statistics, new DXCC entities and gridsquares, breakdowns by mode, band, and propagation, and export options in JSON and text formats for AI/blog post generation. Also adds a navigation link to the header for easy access.
2025-11-14 16:39:56 +00:00
Peter Goodhall
63ec8ff1c4 Add bulk satellite assignment to logbook entries
Introduces functionality to assign satellite information to multiple QSOs in Logbook Advanced. Adds controller and model methods for updating satellite data, a new view for satellite selection, and corresponding frontend logic to handle user interaction and update selected entries.
2025-11-07 15:28:18 +00:00
Peter Goodhall
ec1f2d8ddd Add station location selection to Logbook Advanced
Introduces the ability to view and change the station location for selected QSOs in Logbook Advanced. Updates backend, frontend, and QSO model to support station location display and modification, including new UI elements and AJAX handlers. Removes SimpleFLE documentation file.
2025-11-06 11:00:44 +00:00
Peter Goodhall
a124f25837 Add gridsquare validation to prevent placeholder values
Introduces the isValidGridsquare() method to reject obvious invalid or placeholder gridsquare values (e.g., AA00AA, JJ00JJ) when updating QSO data from callbook information. This ensures only valid gridsquares are stored, improving data quality.
2025-11-05 16:19:28 +00:00
Peter Goodhall
e51aae79eb Change QSO_LOOKUP table collation to utf8mb4_general_ci
Updated the SQL statement in Logbook_model to use utf8mb4_general_ci collation instead of utf8mb4_unicode_ci for the MEMORY table QSO_LOOKUP. This may improve performance for certain lookup operations.
2025-10-20 17:32:04 +01:00
Peter Goodhall
210953fc7d Reset QSL sent status on QSO edit and update DXCC info
In Logbook_model.php, LoTW and eQSL sent status are reset to 'N' when editing a QSO that was previously sent, ensuring re-upload to these services. In common.js, a handler updates DXCC, location, and state fields when the callsign is changed in the QSO edit modal.
2025-10-19 13:18:24 +01:00
Peter Goodhall
c19868b5ff Refactor VUCC search to use query builder methods
Replaced raw SQL LIKE conditions with CodeIgniter's query builder 'like' and 'or_like' methods for VUCC search cases. This improves code readability and helps prevent SQL injection.
2025-10-18 14:41:02 +01:00
Peter Goodhall
7d64275095 Add input validation and secure queries for VUCC details
Enhanced input validation for gridsquare and band parameters in Awards controller to prevent invalid data and potential abuse. Updated Logbook_model to use parameterized queries and early return for empty logbook relationships, improving security and reliability of VUCC QSO details retrieval.
2025-10-18 11:31:48 +01:00
Peter Goodhall
51e5003a0f Validate CAT frequency/mode data and clean up errors
Adds strict validation to the Cat model to prevent non-numeric frequency and invalid mode values from being stored, logging any invalid data for debugging. Introduces migration 229 to clean up existing corrupted CAT table data caused by rig control error messages, and updates migration version. Includes documentation of the issue and applied fix.
2025-10-13 16:58:50 +01:00
Peter Goodhall
0b20964028 Include user_id in station profile query
Added station_profile.user_id to the select statement in the all_with_count method to provide user identification alongside station data.
2025-10-13 15:07:57 +01:00
Peter Goodhall
44a729f335 Optimize QRZ QSO upload/download with batch processing
Improves performance of QRZ QSO upload by batching database updates in the controller and model, reducing the number of individual update queries. Adds a new migration to create indexes supporting QRZ upload/download operations. Refactors QRZ download batch processing to use temporary tables and efficient JOINs for large batch updates, further enhancing speed and scalability.
2025-10-13 15:01:25 +01:00
Peter Goodhall
e6ecfa4f1b Require Clublog username to be a valid email address
Enforces that Clublog usernames are valid email addresses throughout the application, reflecting Clublog's policy change to no longer accept callsigns as usernames. Updates validation in controllers, models, and views, adds a migration to clear non-email usernames, and updates language files in multiple languages to clarify the requirement.
2025-10-13 13:40:56 +01:00
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