# GeoLynx - Unused Files

Working list of files to action. Check off each one as done.

---

## To implement (not delete)

- [x] `www/html/404.php` — wire up as a proper 404 page for unmatched `?do=` routes in `index.php`

---

## To delete — HIGH confidence

No active references anywhere in the codebase.

- [x] `www/html/html_body_bduk_opportunities.php` — abandoned BDUK feature
- [x] `www/html/login.php` — superseded by `html/html_body_login.php`
- [x] `www/html/map_explorer.php` — legacy, never routed
- [x] `www/html/map_v2.php` — superseded by `html/html_body_map_v3.php`
- [x] `www/html/nav.php` — only reference is commented out in `index.php`
- [x] `www/html/nav_html.php` — bypassed; `load_file()` calls `nav_main_html.php` directly
- [x] `www/html/nav_test_hml.php` — typo in filename, nearly empty
- [x] `www/html/nav_test_html.php` — test artifact, never routed
- [x] `www/js/map_v4.js` — superseded by `map_v5.js`
- [x] `www/js/mapv2.js` — superseded by `map_v5.js`
- [x] `www/js/mapv3.js` — superseded by `map_v5.js`
- [x] `www/js/strategy_bduk_opportunities.js` — abandoned BDUK feature
- [x] `www/js/temp.js` — temporary dev file, no references

---

## Database objects with no reference

- [ ] `public.vw_projects_list` — a legacy duplicate of `projects.vw_projects_list`
  (baseline line 7587) with no reference anywhere in `www/`. Left in place rather than
  maintained: migration 058 repointed the `projects` one off the live spatial join and onto
  `projects.project_premises`, and deliberately did not touch this copy, so the two now
  differ. Anything that starts reading it will get the old, slower, double-counting numbers.
  Drop it once someone confirms no external tool queries it directly.

---

## To review — MEDIUM confidence

- [x] `www/js/conflict-detection.js` — Font Awesome auto-generated; safe to delete if FA is served from `lib/` rather than a CDN kit
- [x] `www/js/conflict-detection.min.js` — same as above

---

## Already retired

### Static fields → meta migration (2026-07-17)

No files deleted — code retired in place (`docs/2026-07-15-static-fields-to-meta.md`):

- Main Details static-field HTML blocks removed from `html_body_projectedit.php`,
  `html_body_account_edit_v2.php`, `html_body_stocklistedit_v2.php` — fields now render
  from the `*_fields` meta tables (seeds: db/012–014); only the entity-id hidden inputs
  remain in the templates.
- `WL.autocompleteField` / `WL.col` / `WL.textField` / `WL.dateField` / `WL.selectField`
  and the `.wl-autocomplete-wrap` / `.wl-clear-btn` CSS removed from
  `wayleave_edit_v2.js` / `wayleave_edit_v2.css` — replaced by the shared builders in
  `main.js` (seed: db/015).
- Hardcoded `setupAutoclearButton(...)` calls removed from the three editors —
  `initAutocompleteFields()` in `main.js` registers clear buttons from meta.

### Wayleave module realignment (2026-08-13)

The third rewrite of this module, and the one that brought it onto the shared patterns —
`docs/2026-08-10-wayleave-module-realignment.md`. Everything below is deleted, not
renamed; git holds the previous versions.

| Deleted file | Replaced by |
|---|---|
| `www/html/html_body_wayleaveedit.php` | `www/html/html_body_wayleaveedit_v3.php` |
| `www/js/wayleave_edit_v2.js` | `www/js/wayleave_edit_v3.js` |
| `www/css/wayleave_edit_v2.css` | `www/css/wayleave_edit_v3.css` |
| `www/js/wayleave_edit_v2_fileuploads.js` | `js/project_edit_v2_fileuploads.js` — the shared panel, not a per-module copy |
| `www/html/html_body_wayleave_list.php` | `www/html/html_body_wayleave_list_v3.php` |
| `www/js/wayleave_list.js` | `www/js/wayleave_list_v3.js` |
| `www/css/wayleave_list.css` | Removed — styled a hand-built filter bar and a status pill keyed on the status LABEL |
| `www/fn/wayleave_list_load.php` | `fn/data_get.php` + `wayleave.vw_wayleave_list` |
| `www/fn/wayleave_audit_log_load.php` | `buildAuditLogQuery()` in `global_functions.php` |
| `www/fn/wayleave_map_load.php` | Removed — had no callers at all; the editor fetches map data through `map_get_v2.php` |
| `www/fn/wayleave_field_values_load.php` | Removed — no callers |
| `www/fn/wayleave_field_values_save.php` | Removed — no callers |

New in the same work: `www/fn/wayleave_create.php` (create split out of the save
endpoint, as every other module has it).

### Wayleave V2 refactor (2026-04-24)

| Deleted file | Replaced by |
|---|---|
| `www/html/wayleave_edit.php` | `www/html/html_body_wayleaveedit.php` |
| `www/js/wayleave_edit.js` | `www/js/wayleave_edit_v2.js` + `wayleave_edit_v2_fileuploads.js` |
| `www/css/wayleave_edit.css` | `www/css/wayleave_edit_v2.css` |
| `www/html/wayleave.php` | `www/html/html_body_wayleave_list.php` |
| `www/fn/wayleave_releases_load.php` | Removed — releases tab retired |
| `www/fn/wayleave_releases_save.php` | Removed — see above |
