Commit graph

669 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
Peter Goodhall
f030769b5d Revert "Fix Hamsat VUCC grids issue - improve grid checking logic for satellite QSOs"
This reverts commit 9eb13427ed.
2025-08-02 22:48:54 +01:00
Peter Goodhall
9eb13427ed Fix Hamsat VUCC grids issue - improve grid checking logic for satellite QSOs 2025-08-02 22:47:38 +01:00
Steven Dodd
6f097893c9
Corrected QRZ batch download column name 2025-08-01 11:44:03 +01:00
Steven Dodd
f4521dee31
Fix mismatch between index key and match key for QRZ upload 2025-07-31 21:26:47 +01:00
copilot-swe-agent[bot]
4edc6560cd Fix date parsing in create_qso() to handle user date format preferences correctly
Co-authored-by: magicbug <84308+magicbug@users.noreply.github.com>
2025-07-30 21:39:02 +00:00
Peter Goodhall
af60e40315 removed redundant code 2025-04-18 11:02:22 +01:00
Peter Goodhall
4407da4c22 comment clean up 2025-04-18 10:53:31 +01:00
Peter Goodhall
0b583772f8 wip 2025-04-18 10:45:15 +01:00
Peter Goodhall
0416d8446f Reworked some of the QRZ code for downloading 2025-04-18 10:35:45 +01:00
Peter Goodhall
de543c8bbc
Merge pull request #3204 from DanielBausset/custom-map-dates
Custom maps: set dates to full logbook range + submodes filter fix + some wording fixes
2024-10-30 15:39:14 +00:00
Peter Goodhall
191f5591ba Improved handling of Callbook Data 2024-10-30 15:13:58 +00:00
Danny
d11ff35bfb Custom maps: set dates to full log range + submodes filter fix + some wording fixes 2024-10-12 16:56:04 +02:00
Peter Goodhall
1feca1d29c HamQTH - Correctly handle session key resets 2024-10-08 16:47:15 +01:00