Bumps the configured migration target to 272 and adds migration `272_tag_2_8_15`. The new migration updates the app version in `options` to `2.8.15` and resets `user_options` version dialog confirmation so users see release info. The `down()` method rolls the version value back to `2.8.14`.
Replace fragile quoted-implode station lists with normalized integer CSVs and where_in usage to ensure station_id lists are numeric. Add normalize_location_list helpers in multiple models (Lookup_model, Sig, Timeline_model) and update controllers to cast inputs (e.g. dxcc_id) to ints. Escape user-supplied SQL fragments with $this->db->escape_str/escape_like_str and sanitize band/mode parameters; consolidate band/mode filtering into add_band_mode_filters in Timeline_model. Add guards for empty location lists (returning empty results) and a method_exists check around a legacy vucc_shit call. Overall this improves input validation and reduces SQL injection risk while removing duplicated list-building logic.
Replace string-quoted station_id lists with comma-separated, integer-casted lists and harden SQL across awards models. This diff converts constructions like "'a','b'" to implode(',', array_map('intval', ...)) and uses $this->db->escape_str() for band/mode values and band lists to reduce injection/format issues. Added helper methods (addModeToQuery, addBandToQuery variants) to centralize mode/band filtering, parameterized time/mode/band queries in Gmdxsummer_model, and escaped band arrays when building IN() lists. Also added null/empty-checks for logbook arrays in several models and small refactors (e.g. VUCC addBandToQuery) to keep SQL building consistent.
Sanitize location lists and escape query parameters across multiple models to prevent SQL injection and fix query formatting. Changes include: converting location arrays to comma-separated integer lists (array_map('intval')) instead of quoted implode, adding escape_str for band/mode/sat, adding a sanitize_location_list helper and early-return checks in CQ, escaping band lists, and updating Adif_data date where clauses to use $this->db->escape(..., NULL, FALSE). Files modified: Accumulate_model, Activated_gridmap_model, Adif_data, Cq, and Gridmap_model.
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.
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.
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.
Replace direct lang('prev')/lang('next') calls with localized labels using general_word_previous and general_word_next language lines (falling back to 'Previous'/'Next'). Adds $prev_label and $next_label and updates the pagination links/spans to use them, improving localization support for the previous-contacts pagination.
Introduce window.cloudlogLastCatData and window.cloudlogLastCatRadioId to cache the last CAT response and radio ID, set on successful CAT poll and cleared on UI reset. Add isSatelliteLookupContext() in qso.js to centralize logic for detecting satellite lookup context using UI fields or the cached CAT data, and replace scattered sat_name checks with this helper. This makes satellite lookups more reliable when CAT populates fields and avoids duplicated logic across handlers.
In Logbook_model, only sanitize 'a_index' and 'age' when the input is not an empty string; if filter_var returns an empty string or false, set the variable to NULL. This prevents empty/invalid sanitized values from being treated as valid numeric inputs.
Replace hardcoded '/tmp' sess_save_path with a dynamically generated temp directory based on sys_get_temp_dir() and a hash of the installation path (realpath(FCPATH)). Create the directory with 0700 permissions if it does not exist. Changes applied to application/config/config.sample.php and install/config/config.php to avoid shared /tmp collisions and improve session isolation/security.
Replace hardcoded encryption key in installer with a %encryption_key% placeholder and generate a unique per-install key during installation (uses random_bytes, falls back to openssl_random_pseudo_bytes or sha1(uniqid)). Inject the generated key into config.php. Also tighten User_Model::validate_session(): return early if no user_id, clear session if user_hash is missing, re-read the user from the database to verify user_type before authenticating, and refresh or clear the session accordingly. These changes improve security by using a unique encryption key per install and by validating session state against persisted user data.
Update migration_version to 271 and add Migration_tag_2_8_14. The new migration sets options.version to 2.8.14 and resets user_options (version_dialog/confirmed) to 'false' to trigger the version info dialog for users. The down() method reverts options.version back to 2.8.13.
Introduce an advanced search status display and persist UI state for the Logbook Advanced view. Adds CSS and a status span to show result/selection counts and transient messages. Implements setAdvancedSearchStatus(), getVisibleColumnIndex(), restoreAdvancedSearchUiState() and persistAdvancedSearchUiState() to update status, handle visible columns dynamically, and save/restore collapsed sections and the QSO results selection via localStorage. Also adds client-side date range validation, sets status messages during load/search/failure, and updates status when rows are selected/unselected. Adjusts band/mode column lookups to respect visible columns.
Decode the PHP $options JSON into an object, ensure pota/operator/stationLocation keys exist (each with show:'true') when missing, and emit user_options via json_encode. Replace the previous string-based JS assembly with a robust PHP-side normalization and set $options for the view to the normalized object. Also add a defensive JS check around user_options.operator.show to avoid runtime errors when operator is absent.
Detect a selected radio and avoid reapplying saved satellite defaults when CAT is in use. Adds checks for a non-zero selected radio, skips restoring sat_name/sat_mode when a radio is selected, clears sat fields and their stored catValue, and triggers a radios change to resync CAT state. Also updates reset-on-escape behavior to preserve/clear satellite fields appropriately to prevent stale values from being restored.
Avoid double-processing of the Escape key by setting a timestamp (window.cloudlogQsoEscHandledAt) when handling the QSO-escape keydown and short-circuiting subsequent handlers within 500ms. Also broaden the SAT field restore logic in resetQsoEntryOnEscape to restore sat_name/sat_mode when preSatMode exists or when the previous propagation mode was SAT (not just when preSatName is present). These changes prevent accidental duplicate resets and ensure SAT fields are correctly restored.
After reapplying post-save defaults, schedule a second call to syncFromSelectedRadioAfterReset (250ms delay) in addition to the immediate call. This helps ensure the selected radio state is correctly propagated and avoids timing/race issues with UI or async updates after saving a QSO.
Call syncFromSelectedRadioAfterReset() after reapplyPostSaveDefaults() in assets/js/sections/qso.js so the radio state is re-synchronized following a QSO save/reset. This prevents stale UI values and ensures fields reflect the currently selected radio after saving.
Track and return whether any QSOs were actually uploaded to Clublog and log/report when none are pending. index(): introduced $uploaded_any_qsos and aggregate per-user upload results; if nothing uploaded, echo a message and write an info log. uploadUser(): return false on invalid Clublog username (was previously void); added $uploaded_for_user tracking while iterating station profiles and set it when Clublog responds with 'accepted'. uploadUser now returns true when QSOs were uploaded for the user, otherwise false.
Use FCPATH to build the upload file path and fall back to DOCUMENT_ROOT plus the configured install directory if the file is missing. Normalizes leading/trailing slashes and casts values to strings to avoid notices, and checks file existence before attempting the fallback. This improves robustness when the app is installed in a subdirectory or when DOCUMENT_ROOT is not set.
Trim and store data.prop_mode into propModeFromCat and use it to decide how to update the propagation select. If the value is empty, clear #selectPropagation and remove its stored catValue to avoid carrying stale propagation settings; otherwise call cat2UI with the trimmed value. This prevents leftover propagation mode when CAT provides no prop_mode.
Prevent CAT polling from overwriting user-entered satellite fields by introducing lockSatelliteFieldsToUserInput and only updating #sat_name, #sat_mode and propagation when not locked. Clear stale sat fields if CAT returns empty values. Reset the lock on radio changes and when UI is reset, and set the lock dynamically on user input (or when propagation is SAT).
Also persist the selected radio as a post-save default: include radio in postSaveDefaults, restore it in reapplyPostSaveDefaults (update selects and localStorage), and trigger sat_name input after restore so the locking logic reacts to restored satellite fields.
Capture the QSO start_date when a record is saved and include it in postSaveDefaults so it can be reapplied. Added retrieval of start_date from #qso_input on save and updated reapplyPostSaveDefaults to set the start_date input when provided, preserving the user's selected start date after save.
Check isset($u->row()->winkey_websocket) before casting to bool and default to false if the property is missing. This prevents PHP notices and ensures a consistent boolean value when the winkey_websocket field is null or not present.
Add get_slp_permission_column() to detect and cache the permission column name in station_logbooks_permissions (checks permission_level, access_level, then falls back to legacy permission). Replace hardcoded slp.permission_level references with the resolved column (aliasing to permission_level where needed) across show_all(), public_slugs_accessible_by_user(), check_logbook_is_accessible(), get_user_permission(), add_user_to_logbook(), and list_logbook_collaborators() to avoid failures on partially migrated databases.
Delete duplicate qso['lng'] assignments in application/controllers/Api.php. Longitude is stored in qso['long'], so removing the extra qso['lng'] assignments (from plot_latlng and dxcc fallback) avoids redundant/conflicting keys and keeps the QSO data consistent.
Prefer COL_VUCC_GRIDS over COL_GRIDSQUARE when populating the gridsquare field, and compute plotting coordinates from the grid (via qralatlng) to support VUCC multi-grid line/corner records. Populate lat, long and lng from the grid-derived coordinates, and only fall back to DXCC table coordinates if grid-derived values are not present, avoiding accidental overrides.
Load and interpret the 'remote_operation' user option when no POST value is provided, converting stored 'true'/'1' to 1 and falling back to the existing database value or 0. Ensure post_data always has a default 'user_remote_operation' of '0'. Use a strict check on $post_data['user_remote_operation'] === '1' when persisting the option via user_options_model, and append a concise enabled/disabled status to the success flash message after editing the user.
Add a microphone mute control to the remote operation UI and wire it into the audio pipeline and settings. A new checkbox (remoteOperationMicMuteToggle) is added to the view. JavaScript gains a micMuted setting (default true), persistence to localStorage, UI syncing, and an applyMicMuteState() helper which enables/disables audio tracks on the media stream. The setting is applied when a stream is attached and updated immediately when the user toggles the checkbox.
Add server endpoints to store and retrieve the remote operation link password in the user's account and update the client to use them. Qso controller: added remoteoperationsecret_json and remoteoperationsecret_save which use user_options_model and CI encryption to get/set an encrypted link_password (save enforces a minimum 16-char password, empty value clears it). View and JS: default WebSocket URL changed to wss://relay.cloudlog.org/ws-webrtc; client no longer stores link password in localStorage and instead loads/saves it via the new endpoints (with error handling and UI feedback). Also clear the account secret on reset and stop exposing the password in browser storage.
Introduce an experimental browser-based remote audio feature: bump migration version to 270 and add a migration to add a remote_operation flag to the users table. Add server-side support to User and QSO controllers/models to read/save the remote_operation option (stored via user_options_model) and expose isRemoteOperationEnabled to views and session updates. Add UI: a Remote Operation card on the QSO page, a modal component for detailed settings, a toggle in the user edit page, and conditional loading of assets/js/remote-operation.js. Add a large client-side implementation (assets/js/remote-operation.js) implementing WebRTC signalling, device selection, level meters and diagnostics. Minor session/session-update and helper changes to keep UI state in sync.
Bump migration version to 269, add TEVEL2-1..TEVEL2-9 entries to the Lotw satellite mapping, and add migration 269_set_tevel2_series_to_notsent. The migration sets COL_LOTW_QSL_SENT = 'N' for TEVEL2-1 through TEVEL2-9 so their QSOs are marked not-sent to LoTW; down() is intentionally empty since previous per-QSO sent state cannot be safely restored.
Replace verbose stacked inputs with a compact, responsive grid for F1–F5 macros, add placeholder examples and a macro tokens note, and prefill values in the results view via a $macro_result variable. Also make the modal larger and scrollable and add a close button to improve usability.
Introduce server endpoints to get/save WinKey WebSocket relay settings and token (winkeyrelaysettings_json, winkeyrelaysettings_save, winkeyrelaytoken_json, winkeyrelaytoken_save) using the user_options_model. Add client-side changes to load settings from the account (with a localStorage fallback), save settings to the account, validate URL/token (ws:// or wss:// and token ≥ 8 chars), and clear legacy localStorage keys after a successful save. Defer WebSocket connect until account settings are loaded and update UI text to reflect that relay settings are stored in the user account and follow login across devices.
Introduce optional Winkey Relay transport for CW commands and a browser-based settings UI. Adds localStorage-backed relay config (enabled, url, token, room), a modal to edit/save settings, and validation for URL/token/room. WebSocket logic now switches between direct localhost connection and relay mode, handles relay protocol messages (join, frame, error), authenticates/join on open, and wraps sends via sendWinkeyCommand to support framed relay messages. Updates UI: new Relay button/modal, changed Settings button label/icon, socket status badge updates, and reconnect on save. Keeps compatibility with direct WebSocket server and retains logging and sidetone playback behavior.
Revamp CW sidetone UI and state handling: reorganize controls into responsive Bootstrap columns, switch the enable control to a form-switch, add a Volume range control and a status badge, and make frequency/volume labels responsive. Update cw-sidetone.js to persist and load a new volume setting, add updateVolumeLabel and updateStatusLabel helpers, and wire volume/status interactions in initControls. Persisted keys in localStorage now include cloudlog.cwSidetone.volume.
Add Enter key handling for the CW free-text input (sendText) so pressing Enter sends the message. Replaced the old 'message' keypress handler in footer.php with a DOMContentLoaded listener that binds keydown on #sendText and calls sendMyMessage() (preventing default). Also added matching keydown handling in assets/js/winkey.js to call clickSend() when Enter is pressed on the sendText element.
Introduce a client-side CW sidetone feature: add assets/js/cw-sidetone.js (AudioContext-based morse generator with persistence for enabled/frequency), and wire it into the UI and existing send flows. Include the new script in the footer and add speaker sidetone controls (enable checkbox + frequency slider) to the QSO view. Update winkey.js and websocket macro send handlers to compute a single textToSend, send it as before, and call window.cloudlogCwSidetone.playText(...) when available; also add defensive element existence checks. This provides audible sidetone feedback for CW macros and manual sends while preserving backwards compatibility when the sidetone module is not present.
Replace direct sendTextEl.focus() with setTimeout(..., 0) so the input is focused on the next tick. This avoids timing issues where an immediate focus call can be overridden by synchronous handlers (e.g. blur/submit) and ensures the message input reliably regains focus after sending.
When sending a WebSocket message, the input clearing logic now caches the sendText element, clears its value and calls focus() so the user can immediately start typing the next message. This improves UX by returning focus to the input and slightly refactors the DOM access into a local constant.
Fixes a conditional in Logbook_model.php where the cache-clear check used the wrong variable. The condition now uses $skipexport instead of $skipCacheClear so dashboard cache is skipped appropriately during export operations and cleared otherwise.