# Features — sarugby.online

Evidence date: 2026-09-28. Source: `master` at `8a0437d`.

There is no features document in the source repository. Status labels below are judgements from the code, not from a backlog.

"Current" means the behaviour is present on `master`. It does not mean the live site still serves it.

## Current features

### Public tournament site

| Feature | Location | Notes |
|---|---|---|
| Year home page with featured, international, national, and provincial tournaments | `application/modules/default/controllers/IndexController.php` `indexAction` | Level 1 / 2 / 3. `Hide != 1` excluded from the query; `Hide == 0` required again when bucketing. |
| Tournament profile, logs, matches, stats, results, upcoming fixtures | `TournamentsController::profileAction` | JSON cache plus database. Pool logs when `Structure == 2`. |
| Fixture list | `TournamentsController::fixturesAction` | |
| Result list and legacy result writer | `resultAction`, `resultoldAction` | `resultoldAction` writes `Results_{id}.json` or `Results_all.json` under `UPDATES_PATH`. |
| Match page and lineup | `matchAction`, `lineup()` | Test twins: `matchtestAction`, `lineuptest`. |
| Commentary | `commentaryAction`, `commentrylist` | Spelling in code is `commentry` / `ComentryAndCiting`. |
| Match-report PDF | `getmatchreportAction` | HTML from `https://footprintapp.net/pdf/matchreport/id/{id}`, dompdf A4. |
| Team page and player list | `teamAction`, `getmembers` | `gir_profile` when `SquadType > 12`, else `profile`. |
| News list | `NewsController::indexAction` | Table `News_Articles_SA_Rugby`. Also expects `Results_all.json` and `Fixtures_all.json`. |
| Sportsline-based layout titled SA Rugby / Springboks | `application/layouts/default.phtml` | Assets under `public/wp-content` and `public/wp-includes`. |

### Blue Card

| Feature | Location | Notes |
|---|---|---|
| Concussion consent form | `application/modules/bluecard/controllers/IndexController.php` | Causes, roles, positions 1–15, unions, ethnicity, generated reference. |
| Email of BokSmart / World Rugby documents and insert into `BlueCard_Consents` | `submitAction` | Attachments read from `UPDATE_PATH/bluecard/`. |
| Thank-you copy with Sports Concussion SA and BokSmart links | `indexAction` view variable `thankyou` | |

### Catering menus

| Feature | Location | Notes |
|---|---|---|
| Session dates for a venue | `menu` `SessionController::datesAction` | `Tournament_Foodsessions`. |
| Menus on a date | `menusAction` | |
| Items on a session | `menuAction` | `SessionFood_Items`. |
| Nutrition and allergens | `nutritionAction` | `Nutritions.Allergens` JSON joined to `Allergens`. Layout disabled. |

### Company accreditation

| Feature | Location | Notes |
|---|---|---|
| Registration form data (B-BBEE level, company type, country) | `companiesold` `RegisterController::indexAction` and `default` `CompanyController::registrationAction` | Two entry points. |
| Create company and administrator, email validation link | `Companies_RegisterController::newcompanyAction` | Duplicate registration number, ID number, or email is rejected. |
| Email confirmation turns on `AllowLogin` | `validateemailAction` | |
| Company login, logout, forgot password, reset | `Companies_LoginController` | Table `CompaniesLogin`. Reset email includes the new password. |
| Company home counts | `Companies_IndexController::indexAction` | Users and permits for the identity's company. |
| Add and list company people, optional photo | `UsersController` | Roles: Administrator, Director, Management, Operations, Driver, Technician, General Staff. |
| Permit request for event 27, with driver and occupants | `PermitsController::createAction`, `addpermitAction`, `savepermitAction` | Status starts at 2. Number format `PE` + padded id. |
| Permit PDF | `Companies_IndexController::getpermitpdfAction` | HTML from `https://www.footprintapp.net/pdf/getpermit/id/{id}`. |
| Company profile and upload | `Companies_CompanyController::profileAction`, `uploadAction`, `getmembersAction` | |
| Organisation profile | `Companies_OrganisationController::profileAction` | |
| Event list dump | `Companies_EventsController::indexAction` | `print_r` of `getEvents(2)`. Not a finished screen. |

### Second company-registration module

| Feature | Location | Notes |
|---|---|---|
| Registration that attaches a person to an existing company id | `companyonl` `Company_IndexController::newcompanyAction` | Does not create the company on this path. Validation URL uses the member id. |
| Organisation and "authon" actions | `OrgController`, `AuthonController` | Class prefix `Company_`, not `Companyonl_`. |

### Footprint login

| Feature | Location | Notes |
|---|---|---|
| Login restricted to `FPLogin = 1` | `default` `LoginController` | Table `co_credetials`. MD5 passwords. |
| Reset mail when the stored password is empty, or when a profile exists without credentials | same file | From `support@footprint.net`, brand "SARU E-Filing". |
| Logout | `logoutAction` | |

### Exports and jobs

| Feature | Location | Notes |
|---|---|---|
| Incremental JSON export of tournaments, logs, and squads | `AjaxController::getdataAction` | Unauthenticated. |
| Accreditation queue to A6 PDF and optional AppWizard POST | `CronController::queingAction`, `senddata_to_Api`, `addtozip` | AppWizard only when `AC == 14`. |
| Open-tournament fixture progression | `CronController::matchesAction` | Pool methods when `Structure == 2`. |
| Accreditation queue consumer | `CronController::getaccreAction` | Calls missing method `ApplyAccreditationNow`. |

### Shared lookups present as models

`ef_unions`, `countries`, `Ethnicity`, `positions`, `BBEE_Level`, `B_BBEE_Types`, `Accre_Company_Types`, `vehicletypes`, `EventGates`, `Accreditation_Loading_Zones`, `Accreditation_Load_Services_Types`, `Accreditation_List`, `Accreditation_Permits`.

## Completed features

Git history does not separate features. The whole tree arrived in `9815ef5` (2019-12-18). Nothing can be marked completed-as-a-project-milestone from evidence. The Blue Card attachment names include "2018" and a World Rugby sheet filename dated 22 May 2017, which only dates those files, not a release.

## Planned features

None documented. No TODO file, roadmap, or issue list is in the repository.

Commented code that looks unfinished, not planned:

- Maintenance page in `public/index.php` (commented `exit` before the application boots).
- `LoginController` `forgotAction` is an empty method.
- `CronController::autorunAction` disables the layout and returns.
- `readfileAction` disables the layout and returns.

## In development

No branch other than `master`. Test and copy files are leftovers on `master`, not an active branch:

- `Copy of AjaxController.php`, `Copy of Fixture.php` (declares a second `class Model_Fixture`), `IndexController.php.112619`.
- Actions and views named `test`, `profiletest`, `fixturestest`, `logstest`, `matchestest`, `matchtest`, `indextest`, `hometest`.
- `bluecard` `testAction` sends mail to a hard-coded address.

## Recently changed

The only change after the initial commit is `.gitignore` (`8a0437d`, 2020-01-07), ignoring `application/configs/application.ini`, `public/archives/`, and `website/public/archives/`. The ini file remains in the commit because it was already tracked.

## Deprecated or removed

No removal commit exists. The following are present but look superseded. Treating them as removed would be an inference:

| Item | Why it looks unused | Provenance |
|---|---|---|
| `companyonl` versus `companiesold` | Two registration implementations. Emails from `companiesold` point at `/companies/`, which matches neither directory name. | Inferred. Which one is live is **Unknown** |
| `website/` | Second application tree, fewer files than the root `application/`. | Inferred duplicate. Purpose **Unknown** |
| `resultoldAction` | Name says old. Still callable. | Inferred |
| WooCommerce stylesheets in `default.phtml` | No shop module. | Inferred leftover from the Sportsline theme |
| `application.ini` layout keys `union`, `referee`, `gir`, `accreditations` | `LayoutPicker` sets the layout from the module name and does not read these keys. Those layout files are not in `application/layouts`. | Inferred unused configuration |
| Plesk default page in `test/` | Not referenced by the front controller. | Implemented as a static placeholder |

## Not features of this repository

- Administrator review of companies or permits. Mentioned in email copy. No review UI is in the modules.
- PDF endpoints `/pdf/a6`, `footprintapp.net/pdf/matchreport`, and `www.footprintapp.net/pdf/getpermit`. This app calls them. It does not implement them.
- SonarQube project files named in the task scan. Not in `master`.
