# Features — premiership2020

Evidence date: 2026-10-06.

Source: `git@bitbucket.org:overdrive/premiership2020.git`, `master` at `18849f7` (2020-08-05). `qa` (`1d2ddbc`) and `prod` (`1dfc6d7`) rename the public strings to "PSL Premiership League", change the favicon, and on `qa` only change the database host. See `project-plan.md`.

No features document existed in the source repository. Status labels mean:

- **Current** — reachable from the public controllers and wired to a view or side effect.
- **Completed** — present and not marked unfinished. This repository has no ticket tracker, so "completed" means the same as current unless noted.
- **In development** — none found. Last commit on any branch is 2020-08-05.
- **Planned** — none found. No TODO list, roadmap, or issue file.
- **Deprecated / removed** — removed, commented, or left over from the Sun Met / PSL Operations copy.

## Current features

### Public application wizard

**Status:** Current, completed.

**Where:** Home page `application/modules/default/views/scripts/index/index.phtml` posts to `ApplicationController::applyAction`. Layout title in `application/layouts/default.phtml` on `master`: "PSL Premiership (2020) - Accreditation Portal". Footer "© PSL Premiership". On `qa` and `prod` both say "PSL Premiership League".

**Behaviour:** Stepped form (jQuery Steps): Personal, Organisation, Photo, Apply (when linked events exist), Finish. Home submit URL is `/application/apply/code/{code}`.

The home controller pins the code to `5F28FEBB3BF0C`. `applyAction` uses the code in the URL and renders `application/apply.phtml`, whose form action is `/accreditations/application/apply/code/{code}`.

### Event branding from the accreditation record

**Status:** Current.

**Where:** `Model_AccreditationList::getProfile` reads `Accreditations_view` by `aCode`. `getAccreditationName` builds the heading from `AccreditationName`, dates, location, and, when `FID > 0`, `SquadName1` vs `SquadName2` plus `FixtureDate`.

Banner image is `AccreBanner`. Optional note is `AccreditationNote`. Terms popup body is `TermsAndConditions`. Close copy uses `ContactName` and `ContactEmail`.

### Categories, roles, and media fields

**Status:** Current.

**Where:** `getAccreditationCategoryPublic` (`Teams = 0` and `hidden = 0`). `getAccreditationRoleLive` returns `Role`, `ARID`, `ACID`, `photo`, `SupplierReg`. Changing category filters roles in the browser by `ACID`.

When `MediaOnly == 1`, editor/producer name and email are shown and marked required. The Openfield / Roth Media radios are inside an HTML comment.

When the selected role has `SupplierReg` 1, a note points at `http://supplier.sarugby.online`. The header link to supplier registration is commented out.

### Headshot capture and Footprint upload

**Status:** Current.

**Where:** Cropper.js on the Photo step. `applyAction` does not call `SavePhoto` (that call is commented). It POSTs the data URL to `https://www.footprintapp.net/accreditations/application/updateimage`. Profile reads `https://www.footprintapp.net/accre/photos/{Ref}.jpg`.

`SavePhoto` still exists and writes under `AC_PATH . '/photos/'`. `AC_PATH` is not defined in `public/index.php`. The live submit does not use it.

### Duplicate-email warning

**Status:** Current. Not enforced on insert.

**Where:** Home page calls `IndexController::checkemailAction` (`/index/checkemail`). Profile and `ApplicationController::checkemailAction` use `/application/checkemail`. Both count rows in `AccreditationApplycation` for that email and `AC`.

### Reference number and confirmation email

**Status:** Current.

**Where:** `random_id(3)` then `strtoupper`. Insert into `AccreditationApplycation`. If `EmailNotes` is not empty, `EmailApplicant` then `sendMail`. Subject on `master` is "PSL Premiership Notification".

### Sign-in, profile, and edit

**Status:** Current.

**Where:** `login.phtml`, `loginnowAction`, `profileAction`, `updateAction`, `updateimageAction`, `logoutAction`.

Session namespace `user_session`. Profile status labels: New Application, Pending, In Review, Confirmed, Declined, Approved. Confirmed, Declined, and Approved disable inputs in the browser. `updateAction` does not check the session or the status.

### Attendance confirm and cancel

**Status:** Current.

**Where:** `attendanceAction`, `attendance.phtml`. Key lookup `getByAttandanceID`. Attend clears `AttendanceKey` and emails `EmailAttandanceConfirmed`. Cancel sets `Status` 2 and history "Declined by Applicant".

The profile page also prints the same two links when `AttendanceKey` is not empty.

### Closed applications page

**Status:** Current.

**Where:** View switch in `indexAction` and `applyAction` to `application/closed.phtml`. Text: "Accreditation applications is now closed."

### Browser gate and theme

**Status:** Current.

**Where:** `application/layouts/default.phtml`. Empty user-agent or `MSIE` shows a Chrome/Firefox panel. `Theme == 2` on the accreditation row recolours wizard steps.

### Error page

**Status:** Current.

**Where:** `ErrorController::errorAction`. 404 message "Page not found". Other errors "Application error". `displayExceptions` is 1 in the production section of the bak ini.

### Deployment

**Status:** Current as pipeline config. Last used in Git on 2020-08-05. Whether a host still runs it is **Unknown / Requires Confirmation**.

**Where:** `bitbucket-pipelines.yml` (branches `qa` and `prod` only), `codedeploy_deploy.py`, `appspec.yml` (destination `premiership2020.magus.events`), `scripts/`.

## Features present in code and not on the public path

These exist in the tree. Nothing in the layout links to them.

| Feature | Where | Note |
|---|---|---|
| Role list page | `ApplicationController::indexAction`, `application/index.phtml` | Lists every row from `AccreditationRoles`. Separate from the wizard |
| Multi-applicant form | `applymultipleAction`, `applymultiple.phtml` | Field names `app[]` are not what the action reads. Posts to `/accreditations/application/apply/...` |
| Apply test | `applytestAction`, `applytest.phtml` | Alternate wizard. Posts to the `/accreditations/` prefix |
| Attendance test | `testattendanceAction`, `testattendance.phtml` | Same writes as attendance, prints exceptions |
| Mail test | `testAction` | Sends to a hard-coded address |
| Barcode image | `barcodeAction` | Draws a fixed code `FD5T67`. Includes `Barcode39.php`, which was not found next to the controller |
| Placeholder image action | `imageAction` | Returns a hard-coded GIF (`Content-type: image/gif`) |
| Sean view | `views/scripts/sean/index.phtml` | No `SeanController` |
| Index test view | `views/scripts/index/test.phtml` | No `IndexController::testAction` |
| Partners action | `partnersAction`, empty `partners.phtml` | Empty |
| Permit, gate, loading, and service models | `application/models/AccreditationPermits.php` and neighbours | No public controller calls them. **Inferred** leftovers from the shared accreditation schema |
| Tournament notifications | `library/Other/Notifications.php` | Class `Notications`. `SquadAddedToTournamnt` is empty |

## Deprecated or removed

### Openfield and Roth Media invitation

**Status:** Removed from the live form. The radios remain inside an HTML comment in `index/index.phtml` (values 1 Openfield, 2 Roth Media).

**Evidence:** Commit `cf9251d` (2020-01-13) "Remove Openfield / Roth media from Sunmet media", and the comment markers in the current view.

### PSL Operations naming and the previous event code

**Status:** Replaced on this repository's later commits. Still the identity of the sibling repository `overdrive/psl2020`.

**Evidence:** `611b0d3` changes title, footer, mail, homepage terms, and the hard-coded code from `5F27014B26D5F` (PSL Operations) to `5F28FEBB3BF0C` (PSL Premiership). Deploy path moved through `psl2020.magus.events` → `premier2020.magus.events` (`8e354fa`) → `premiership2020.magus.events` (`0ff663c`).

### Maintenance splash

**Status:** Commented out.

**Where:** Top of `public/index.php`. A "technical difficulties" message and `exit` are commented. The app boots.

### HTTPS and www redirect

**Status:** Commented out.

**Where:** Root `.htaccess`. The active rule only prefixes `/public/`.

### Supplier registration nav item

**Status:** Commented out in the header. The SA Rugby supplier sentence still appears when a role has `SupplierReg` 1.

**Where:** `default.phtml` comment around `http://supplier.sarugby.online/register`.

### Local photo save on the live submit

**Status:** Commented out in `applyAction` (`SavePhoto`). Replaced by the Footprint POST.

### SA Rugby acceptance paragraph on the direct apply view

**Status:** Still present on `apply.phtml`. The homepage paragraph was replaced. Provenance: **Implemented** leftover, not deleted.

## Not found

- Planned features, feature flags, or a changelog.
- Admin approval, printing of passes, or barcode scanning of a real applicant barcode.
- Member accounts with passwords.
- Automated tests.
- `sonar-project.properties` and `sonarqube_scan.bat` (named in the onboarding task's scan listing, not tracked in Git).
