Commit graph

5806 commits

Author SHA1 Message Date
Peter Goodhall
fe38b96cce Add migration 250 tagging release 2.8.8
Bump migration version to 250 and add Migration_tag_2_8_8. The new migration sets the stored app version to 2.8.8 and resets the user's version_dialog confirmation (option_value = 'false') to trigger the version info dialog. The down() method rolls the version back to 2.8.7.
2026-02-19 16:06:41 +00:00
Peter Goodhall
88e95b0db9 Add HTMX modal upload and cert table refresh
Enable HTMX-driven certificate uploads and partial UI updates for LoTW. Updated Lotw controller to detect HTMX requests in do_cert_upload, return inline success/error alerts for modal uploads, and added cert_table_refresh endpoint to return the cert table partial. Extracted the certificate table into a new view (lotw_views/cert_table.php) and replaced the inline table in index.php with a container that loads that partial. Added a Bootstrap modal view (upload_cert_modal.php) with an HTMX multipart form, drag-and-drop file UI, JS handlers to manage upload state and refresh the certificate list, and modal reset behavior. Minor refactors to flash/success handling to support both full-page and HTMX flows.
2026-02-18 15:51:19 +00:00
Peter Goodhall
7f7d2a6426 Add left-positioned dropdown submenu styles
Mark certain dropdowns (Gridmaster, Other Export Options, Third Party Logbooks) with a new dropdown-submenu-left class in header.php so submenus can open to the left. Update general.css to style .dropdown-submenu and .dropdown-submenu-left positioning, refine .navbar .dropdown-menu appearance, and improve dropdown item spacing, hover effects and submenu chevron styling for better alignment and visual consistency (prevents overflow and improves UX).
2026-02-17 22:58:21 +00:00
Peter Goodhall
f26c112437 Report found vs updated LoTW QSOs
Initialize and increment a $found_count while parsing ADIF records when import_check returns 'Found', then after batch update compute already-confirmed QSOs and expand the LoTW status message to include: Found, Updated, Already confirmed, and Gridsquares updated. Uses max(0, ...) to avoid negative already-confirmed values and updates the log output accordingly.
2026-02-17 15:35:06 +00:00
Peter Goodhall
9338ca4769 Include LoTW status in table HTML
Append the LoTW status div to the $table variable before assigning it to $data['lotw_table'], rather than concatenating it afterward. This ensures the status is part of the table HTML output and avoids the separate post-assignment append.
2026-02-17 15:33:41 +00:00
Peter Goodhall
a94a8759e0 Remove LoTW Status column; add status summary
Remove the per-row "LoTW Status" header and cells from the Lotw table output to avoid repeating the same status for each QSO. Instead, append a single "LoTW Status" summary div after the table using $lotw_status. This simplifies the table layout and centralizes the LoTW status display.
2026-02-17 15:30:53 +00:00
Peter Goodhall
ad81bd81de Support batch updates by primary key
Allow LoTW batch updates to reference QSOs by COL_PRIMARY_KEY for reliable matching. Controller: include 'primary_key' in batch update payloads. Model: collect numeric primary keys, expand WHERE to include COL_PRIMARY_KEY IN (...) alongside the existing datetime/call/band/station match, add early exit/log when no usable keys provided, and build an id-based lookup (qso_map_by_id) to prefer primary-key matches while remaining backward-compatible with the composite key lookup. This reduces ambiguous matches and improves update accuracy.
2026-02-17 15:28:53 +00:00
Peter Goodhall
392a1389d6 Map additional satellite names in Logbook_model
Add mappings for QMR-KWT-2 -> QMR-KWT-2_(RS95S) and Lobachevsky -> Lobachevsky_(RS83S), and introduce conditional APRS name mapping for BOTAN (when COL_MODE == 'PKT') and SONATE-2 (when COL_MODE == 'PKT'). These changes extend satellite name normalization in application/models/Logbook_model.php to handle these satellites and modes.
2026-02-17 14:21:24 +00:00
Peter Goodhall
60fe6ddbf2 Format notes view templates
Normalize indentation, spacing and PHP/HTML formatting in application/views/notes/main.php and application/views/notes/station_diary_print.php. Changes are purely cosmetic (whitespace, indentation, minor spacing around concatenation and tags, and newline adjustments) to improve readability and consistency; no functional logic was modified.
2026-02-13 11:16:49 +00:00
Peter Goodhall
680612ca01 Add Station Diary print view & action
Add a Station Diary print feature: controller Notes.php now sets a has_diary_entries flag for the main notes view and adds a station_diary() action that loads Station Diary entries and renders a print-friendly view. The notes main view conditionally shows a "Station Diary" button that opens the print page in a new tab. A new view notes/station_diary_print.php provides a print-optimized layout, entry listing with date/time handling, total entries summary, a print button, and a friendly fallback when no entries are found.
2026-02-12 22:30:08 +00:00
Peter Goodhall
bef1e54820 Show saved timestamp in notes views
Display the saved creation timestamp (including time) across notes list, note view, and edit form. Adds a human-readable "Saved" line in application/views/notes/edit.php and application/views/notes/view.php, and updates application/views/notes/main.php to include the time using the format "M d, Y \a\t g:i A". The date input in the edit form still uses a YYYY-MM-DD value for the date picker, and entries with empty or zero dates show "N/A".
2026-02-12 22:20:52 +00:00
Peter Goodhall
a4ec01a8ea Add Station Diary modal and quick_add endpoint
Introduce a Station Diary UI and backend endpoint to allow quick note creation via HTMX. Added Notes::quick_add in the controller with form validation, note creation, success/error responses and a small JS form reset. Updated view_log/index to show a Station Diary button (when user_show_notes=1) and include the modal form that posts to notes/quick_add and renders messages into the modal.
2026-02-12 22:08:55 +00:00
Peter Goodhall
440f5b18a9 Skip unsaved-change warning if callsign empty
Add checks around the unsaved-changes logic to bypass the confirmation when the #callsign field is present but empty. The patch inserts a guard in the page unload catcher and before showing the confirmation so users creating new/blank callsign entries won't receive an unnecessary unsaved-change warning (checks element existence and uses trim()).
2026-02-11 21:45:03 +00:00
Peter Goodhall
c57c250b45 Use distinct() and fix station field
In Logbook_model.php, replace select('DISTINCT user_id') with $this->db->distinct(); $this->db->select('user_id') to use CI's distinct API and produce correct SQL. Also correct the where clause to use station_logbooks_relationship.station_location_id instead of station_id so shared-access users are filtered by the proper station location.
2026-02-11 14:16:51 +00:00
Peter Goodhall
41a8849d7e Cache dashboard stats and add DB indexes
Add per-user/logbook file caching for dashboard statistics (15min TTL) and update Dashboard controller to use cached qso, countries, VUCC and QSL queries. Introduce clear_dashboard_cache() in Logbook_model and call it on QSO create/update/delete to invalidate affected users' cache entries. Add migration (249) to create composite indexes (idx_dxcc_stats, idx_vucc_gridsquare, idx_vucc_grids) to improve dashboard query performance, and bump migration_version to 249. Also include generated cache files under application/cache for current stats.
2026-02-11 13:18:52 +00:00
Peter Goodhall
654c456a35 Fix migration index drop logic
Replace malformed code with a proper existence check for the 'idx_confirmation_match' index, drop the index with ALTER TABLE if present, and re-enable db_debug. This fixes a syntax/logic error in the migration so the LOTW/QRZ/eQSL confirmation match index is removed safely during migration.
2026-02-11 13:07:55 +00:00
Peter Goodhall
d3d551c59b Remove gridsquare index drop; re-enable db_debug
Delete the conditional block that dropped the `idx_gridsquare_prefix` index from the table. Add `$this->db->db_debug = true;` and close out the migration method/class. This prevents the migration from removing the gridsquare prefix index and ensures DB debug mode is restored after the migration.
2026-02-11 13:05:16 +00:00
Peter Goodhall
d4a7e4cfac Batch eQSL updates and add indexes
Add batch processing for eQSL imports/exports and introduce performance indexes. Bump migration_version to 248 and add Migration_add_eqsl_performance_indexes to create idx_eqsl_qslrdate and idx_eqsl_confirmation_match indexes to speed up eQSL queries and batch matching. Modify Eqsl controller to collect successful uploads and perform a single batch mark-as-sent update. Update EqslImporter to queue confirmations and run a single batch update at the end. Implement eqsl_update_batch() and eqsl_mark_sent_batch() in Eqslmethods_model to perform efficient batch DB operations and logging, reducing per-record queries for large eQSL operations.
2026-02-11 11:32:25 +00:00
Peter Goodhall
bcd9ded47e Rename LOTW index to idx_confirmation_match
Replace the specific idx_lotw_confirmation_match index with a generic idx_confirmation_match and update related comments and local variable names. Comments now note the index benefits both LOTW and QRZ processing (import_check, lotw_update_batch, process_qrz_batch). The composite index columns remain (COL_TIME_ON, COL_CALL, COL_BAND, COL_STATION_CALLSIGN); existence checks and add/drop statements were adjusted to use the new name.
2026-02-11 11:17:09 +00:00
Peter Goodhall
cfa24d9f1a Add LoTW batch updates and performance indexes
Bump migration version to 247 and add a migration that creates performance indexes for LoTW workflows (idx_lotw_qslrdate, idx_lotw_qsos_to_upload, idx_lotw_confirmation_match) to speed common queries. Refactor Lotw controller to collect records in memory, build rows for rendering, and perform a single batch confirmation update via a new Logbook_model::lotw_update_batch() method instead of many individual updates. Implement lotw_update_batch() to look up matching QSOs, perform update_batch() calls, and separately update gridsquares/distances using the Qra library. Simplify LotwCert::toggle_archive_certificate() to toggle archived state with a single UPDATE and return the resulting status.
2026-02-11 11:14:59 +00:00
Peter Goodhall
2cb8d62860 Add gridsquare prefix index and optimizations
Bump migration version and add a new migration (246) to create/drop a 4-char prefix index on COL_GRIDSQUARE to speed LIKE queries; migration 245 now also drops the prefix index if present. Add Stations::user_owns_station and use it in Logbookadvanced_model to avoid N+1 station lookups. Add caching to Logbooks_model::list_logbook_relationships to prevent redundant queries. Optimize Oqrs_model queries to select only needed columns for several methods. Add Stats::getUniqueCallsignsConsolidated to combine multiple unique-callsign groupings into a single set of queries for better performance. Database debug toggles added where appropriate.
2026-02-11 11:09:39 +00:00
Peter Goodhall
f01599e6a5 Add indexes and batch processing for uploads
Improve query performance and memory usage by adding a migration to create several indexes and converting various upload/reporting flows to batched processing. Changes include:

- Add migration 245 to create indexes: idx_mode, idx_sat_name, idx_continent, idx_qsl_stats (composite), idx_hrdlog_upload, idx_qrz_upload to speed common queries.
- Bump migration version to 245 in config.
- Hrdlog and Qrz controllers: switch to fetching QSOs in LIMIT/OFFSET batches, process updates in chunks, add logging for batch progress, and use break 2 to stop outer loops on invalid API keys to avoid continuing work.
- Logbook_model:
  - get_hrdlog_qsos and get_qrz_qsos now accept limit/offset and use ORDER BY/LIMIT/OFFSET for batching.
  - Replaced a subquery with a JOIN for grid-based filtering to improve performance.
  - get_modes rewritten to use query builder (distinct/select/order_by).
  - Bulk DXCC updates use update_batch instead of per-row queries.
  - calls_without_station_id limited to 500 results to avoid UI hangs.

Overall goal: prevent memory exhaustion with large datasets and improve database query performance.
2026-02-11 10:59:24 +00:00
Peter Goodhall
1d51b608ae Use direct lotw_users joins instead of subqueries
Replace repeated LEFT OUTER JOIN (SELECT callsign, MAX(lastupload) ...) derived-table joins with simpler LEFT JOIN lotw_users lotw across Distances_model, Logbook_model, Logbookadvanced_model, and Worked_all_britain_model. Also remove an unnecessary DISTINCT/inner station_profile join from an optimized Logbook_model subquery. These changes simplify SQL emitted by the CI query builder, improve compatibility and readability, and may improve performance; note that using direct joins can change which lastupload row is returned if multiple lotw_users rows exist for a callsign.
2026-02-11 10:50:22 +00:00
Peter Goodhall
dfb005899e Add migration to tag Cloudlog 2.8.7
Bump migration version to 244 and add migration 244_tag_2_8_7. The new migration updates options.version to 2.8.7 and resets user_options.version_dialog.confirmed to false to trigger the version info dialog; the down() method reverts options.version to 2.8.6.
2026-02-02 13:07:24 +00:00
Peter Goodhall
c556a42892 Add advanced filtering and stats to WWFF awards page
Enhanced the WWFF awards page with band, mode, and QSL type filters, quick preset buttons, and a summary section showing worked/confirmed parks and milestone progress. Updated the controller to handle filter input and summary data, and extended the model with methods for filtered queries and statistics.
2026-01-21 17:36:18 +00:00
Peter Goodhall
e85e18018e Enhance WAJA award page with filters and stats
Added collapsible filter panel with quick preset buttons, improved form layout, and a new statistics summary section showing WAJA progress and milestones. Prefecture names in the table are now clickable to view QSOs. Updated SQL queries in the Waja model to use the correct band key and improved SAT handling.
2026-01-21 17:31:32 +00:00
Peter Goodhall
0e7a2ccd39 Add CSV export for SIG QSOs
Introduced a new controller method sigexportcsv() to export SIG QSO data as a CSV file. Added a corresponding button in the SIG QSO list view to allow users to download the CSV export.
2026-01-21 17:19:48 +00:00
Peter Goodhall
e6b12e9f3d Redirect WAB SIG to dedicated awards page
Updated the SIG awards table to redirect WAB entries to a dedicated WAB awards page instead of the generic SIG details page. This improves navigation and user experience for WAB award users.
2026-01-21 17:17:27 +00:00
Peter Goodhall
2d9c4182d2 Add SIG award filters and translations
Introduces filtering by band, mode, and confirmation status to the SIG awards section in Awards.php, including a filter summary helper. Updates all supported language files to add translations for the new SIG award filters, table headers, and related UI elements.
2026-01-21 17:15:01 +00:00
Peter Goodhall
2a2f62ccbc Add filtering and localization to WAB award view
Introduces band, mode, and confirmed-only filters to the Worked All Britain (WAB) award view and details AJAX endpoint. Updates the controller, model, and view logic to support filtering, and adds new localized strings for WAB award UI elements in multiple languages. Also ensures the correct script is loaded for the WAB section and improves the Bands model to check for field existence before filtering by award.
2026-01-21 16:54:24 +00:00
Peter Goodhall
65a7170bbc Add Docker environment detection to debug page
Introduces logic in the Debug controller to detect if the application is running inside a Docker container and displays the result on the debug view. This helps developers quickly identify the runtime environment for troubleshooting and configuration purposes.
2026-01-15 15:40:34 +00:00
Peter Goodhall
0f4dbaaa8d Enhance debug view with system and PHP details
Added display of installation path, server API, HTTPS status, available disk space, database info, PHP settings, session information, and checks for gd and json PHP modules to the debug/main.php view for improved diagnostics.
2026-01-15 15:36:23 +00:00
Peter Goodhall
618154f380 Add managed config status to debug view
Displays a 'Managed' row in the debug table if the managed.php config file exists, providing clearer visibility into the application's configuration state.
2026-01-15 15:29:51 +00:00
Peter Goodhall
3fdeee9dc6 Add ZIP extension check to backup page
The backup controller now checks if the PHP ZIP extension is installed and passes this information to the view. The backup page displays a warning if the extension is missing, guiding users to install it for backup and restore functionality.
2026-01-15 15:26:15 +00:00
Peter Goodhall
c5728f09c2 Add zip extension status to debug view
The debug page now displays whether the PHP zip extension is installed, providing clearer visibility into server configuration.
2026-01-15 15:24:47 +00:00
Peter Goodhall
3694af2c40 Move 'nothing found' row to table footer
The message indicating no results are found is now displayed in the <tfoot> section instead of <tbody> for better semantic HTML structure.
2026-01-15 13:43:43 +00:00
Peter Goodhall
3d32a36036 Stream JSON export for large user backups
Refactored the backup export process to stream JSON data directly to a file handle, significantly reducing memory usage for large datasets. QSOs and logbooks are now written in chunks, and memory is freed periodically. Increased max execution time and adjusted memory limit to optimize for streaming. This improves reliability and scalability for users with large logbooks.
2026-01-15 10:35:50 +00:00
Peter Goodhall
7793b2446a Update mode dropdown to use submode if available
Modified the mode selection dropdown to display submode if it exists, otherwise fallback to mode. Also updated the iteration to use the result() method for consistency with the data structure.
2026-01-14 22:48:55 +00:00
Peter Goodhall
1e89b420fd Fix JSON encoding for map data with invalid UTF-8
Adds JSON_INVALID_UTF8_SUBSTITUTE to json_encode for $qsos_by_ref and $confirmed to handle invalid UTF-8 data, preventing JavaScript errors when rendering the SOTA map.
2026-01-14 22:47:24 +00:00
Peter Goodhall
953b27783b Tag Cloudlog as version 2.8.6 and update SOTA UI
Added migration 243 to tag Cloudlog as version 2.8.6 and updated the migration version in config. Improved SOTA awards table to display a message outside the table when no results are found. Modified the SOTA index page to trigger filter refresh on 'Apply' and adjusted DataTables language options for empty states.
2026-01-14 16:43:53 +00:00
Peter Goodhall
897ba50c0e Add UI for manual data file updates in maintenance
Introduces a new section in the maintenance page allowing manual updates of reference data files (Clublog SCP, LoTW Users, DOK, SOTA, WWFF, POTA) via AJAX buttons with loading indicators. Adds corresponding UI-friendly controller methods with authorization checks and improves the WWFF update logic to process CSV files line by line for better memory efficiency.
2026-01-14 14:55:07 +00:00
Peter Goodhall
5583cd8c14 Add comment support to SimpleFLE QSO entries
Introduces the ability to add comments to QSOs by enclosing text in angle brackets, updates the UI to display a new Comment column, and documents the feature in the syntax help. The JavaScript logic is updated to extract, display, and save comments with each QSO.
2026-01-14 10:23:15 +00:00
Peter Goodhall
821e1c2163 Remove RST columns from SOTA awards table
The RST sent and received columns have been removed from the SOTA awards table for a cleaner display. The colspan for the 'nothing found' row was also updated to match the new column count.
2026-01-13 14:02:53 +00:00
Peter Goodhall
de3f72c536 Improve SOTA CSV download and parsing logic
Refactors the SOTA CSV download process to stream data directly to a temporary file using cURL, improving memory efficiency and error handling. Replaces the previous string-based CSV extraction with a file-based approach, and adds more robust error messages for file and download failures.
2026-01-13 13:40:00 +00:00
Peter Goodhall
8b819d2177 Refactor and enhance SOTA awards support
Replaces the old SOTA model with a new Sota_model, adds CSV-based summit metadata caching, and introduces new controller endpoints and view components for SOTA table, stats, and map fragments. The SOTA award page now supports filtering, improved statistics, and interactive mapping using summit coordinates. Updates .gitignore to include the new SOTA CSV, and refactors SOTA data refresh logic for reliability and maintainability.
2026-01-13 13:35:11 +00:00
Peter Goodhall
a59bf0ce35 Fix SQL query to use 'in' for station_id comparison
Updated the SQL query to use 'station_id in (...)' instead of 'station_id = ...' in the subquery, ensuring correct filtering when multiple station IDs are provided.
2026-01-13 10:45:52 +00:00
Peter Goodhall
2f917c8bcf Add advanced POTA awards dashboard with filtering and map
Introduces a new POTA awards dashboard with HTMX-powered filtering, statistics, progress bars, and a Leaflet map of worked parks. Adds new controller endpoints, model methods for filtered queries and park metadata, and modular view components for table, stats, progress, and map. Updates language files for new stats labels and enhances the update process to cache the full POTA parks CSV for richer features.
2026-01-10 15:08:22 +00:00
Peter Goodhall
eb03e364d5 Add editable created date to note editing
Introduces a 'Created Date' field to the note edit form, allowing users to set or update the creation date of a note. The model is updated to handle and save the optional 'created_at' value when provided.
2026-01-09 16:37:11 +00:00
Peter Goodhall
0ca9484ef2 Improve created_at date handling in notes list
Updated the logic to display 'N/A' for invalid or empty created_at values, including the '0000-00-00 00:00:00' placeholder, ensuring more accurate date representation in the notes view.
2026-01-09 16:17:32 +00:00
Peter Goodhall
ae97ef5152 Add created_at to notes and enable date filtering
Introduces a migration to add a created_at timestamp to the notes table. Updates the Note model and Notes controller to support filtering notes by creation date, and enhances the notes view to include date filter fields and display the created date for each note. Migration version is incremented to 242.
2026-01-09 16:13:57 +00:00