Commit Graph
4 Commits
Author SHA1 Message Date
CydandClaude Opus 4.8 689c6a4dd2 Item #4: centralize timezone, collapse the 16 pod branches to loops
- includes/db.php now defines PQS_TIMEZONE and sets it on include; the 9 files
  that hardcoded date_default_timezone_set('America/Chicago') drop the call
  (main pages already load db.php; display includes now require it).
- console.php: pod load and the 16 pod-checkbox lines collapsed into loops over
  a $pods array (fixed 16 kept - hardware max). Output unchanged.

Verified: timezone resolves to America/Chicago via the constant; console commit,
config update, and pod-checkbox rendering all correct; registration suite green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:30:57 -05:00
CydandClaude Opus 4.8 5aa01db123 Parameterize console.php; make Commit Mission atomic
- Config 'Update', 'Commit Mission', lock, and clearupdate now use db.php
  helpers with bound params (were injectable via ~20 raw $_GET values incl.
  nummercs and playerid). Pod toggles collapsed into a 16-iteration loop.
- Commit Mission runs under the shared queue lock and one transaction so a
  registration can't slip into the mission mid-commit.
- dev/migrations/002: pqs_currentmission + pqs_pastmissions -> InnoDB so the
  commit's snapshot/archive roll back with the queue delete (uses DELETE not
  TRUNCATE to stay in the transaction).

Verified: commit moves players to current/past, empties queue, marks completed
with nummercs; config update writes pods + settings; no errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:59:27 -05:00
CydandClaude Opus 4.8 061291c951 Add centralized DB helper; fix legacy mysql_error() landmines
- includes/db.php: shared mysqli connection + parameterized query helpers
  (pqs_db/pqs_exec/pqs_rows/pqs_row/pqs_val), targets PHP 7.4+.
- Replace 11 mysql_error() calls (undefined function on PHP 7+) with
  mysqli_error($link) / mysqli_connect_error() across getFSgame, getFSplayers,
  config, callsign, console. Only affected already-failed error paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 12:51:13 -05:00
CydandClaude Opus 4.8 22e59d6290 Initial commit of PQS
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 10:59:51 -05:00