# Features — magus-core

Evidence date: 2026-10-09. Source: `git@bitbucket.org:overdrive/magus-core.git`, `master` at `f806a7e` (2019-08-19).

No features file existed in the repository or in Silicon Ark. Status below is against this snapshot only. "Current" means the code is on `master` and is reachable from a controller. It does not mean the screen succeeds at runtime when a class is missing.

## Current features

### Public access

| Feature | Where | Status |
|---|---|---|
| Login form | `LoginController::indexAction`, `views/scripts/login/index.phtml` | Implemented |
| Logout | `LoginController::logoutAction` | Implemented |
| Forgot password | `LoginController::forgotAction` | Implemented |
| Reset password | `LoginController::resetAction` | Implemented |
| Supplier registration form | `RegisterController::indexAction`, `views/scripts/register/index.phtml` | Implemented. Form data action calls missing models |
| Email validation page | `RegisterController::validateemailAction` | Implemented |
| Address geocoding JSON and HTML dropdowns | `GeoController` (`getaddress`, `autocomplete`, `geoinfo`, `getsuburb`, `getsuburbdrop`, `getstreetdrop`) | Implemented. No login |
| SA Rugby terms footer and copyright | Login, register, and reset views link to `http://www.sarugby.co.za/` | Implemented |

### Signed-in navigation

The layout includes `menu/nevigation.phtml` (spelled that way in the file name).

| Menu label | href | Backing feature |
|---|---|---|
| Dashboard | `/` | Empty `indexAction` |
| Companies | `/companies` | Company list, add, edit |
| Users | `/users` | User list, add, edit, profile, image upload, delete |
| Venues | `/venues` | Venue list, add, edit |
| Events | `/events` | Event list bound to `Accreditation_List` |
| Accriditations | `/events` | Same URL as Events. Spelling is the menu's |
| Load Permits | `/events` | Same URL as Events |
| Company Types | `/types/` | `TypesController` |
| User Roles | `/roles/` | `RolesController` |
| My profile | `/users/profile/id/{MID}` | Header link in `default.phtml`. `profileAction` is empty |
| Logout | `/login/logout` | Header link |

### Accreditation and permits

| Feature | Where | Status |
|---|---|---|
| Accreditation list with Active / Inactive / Closed | `AccreditationController::listAction` | Implemented. Not linked from the live sidebar |
| Accreditation edit modal | `AccreditationController::editAction` | Reads `Model_Events`. `addAction` only disables the layout |
| Event list | `EventsController::listAction` | Same model as accreditation |
| Event permit table | `EventsController::getpermitsAction`, `getpermiteAction` | Implemented, including check-in / check-out / delete / SMS menu items in the HTML |
| View one permit | `EventsController::getpermitAction` | Loads gates, zones, companies, vehicle types, services |
| Save permit edits from events | `EventsController::savepermitAction` | Updates occupants JSON and applicant audit columns |
| Create permit | `PermitsController::addpermitAction` | Sets status 2 and sends mail when `Surname == 2` |
| Edit permit | `PermitsController::savepermitAction` | Applicant audit columns |
| Permit profile | `PermitsController::profileAction`, `profiletestAction` | Load-in and load-out dates, lock flag |
| Permit FAQ | `PermitsController::questionsAction` | Hardcoded questions, including HealthandSafety7s@sarugby.co.za and security@sarugby.co.za |
| Loading zones, gates, vehicle types, service types | Models `AccreditationLoadingZones`, `AccreditationGates`, `AccreVehicleTypes`, `AccreditationLoadingServices` | Implemented as reads |

### Reference data

| Feature | Where | Status |
|---|---|---|
| Company types CRUD | `TypesController` | Implemented |
| User roles CRUD | `RolesController` | Implemented |
| B-BBEE levels | `Model_BBEELevel` | Read on registration and company add. No CRUD screen found |
| Countries, provinces, cities, suburbs | Matching models | Read while saving venues and populating forms |

### Files

| Feature | Where | Status |
|---|---|---|
| User photo upload | `UsersController::imageuploadAction` | Writes `{MID}_image.jpg` under `public/photos` |
| Company photo by id | `LoginController::companypicAction` | Streams a file or an embedded placeholder. No login check on this action |
| Remote company image POST | `LoginController::uploadremotecompanyAction` | Writes `companies/{cid}_image.jpg`. No login check. Update uses missing `Model_CompanyProfile` |

## Incomplete or stub features

These files exist and are routed, and the action body does not perform the menu promise.

| Feature | Evidence | Status |
|---|---|---|
| Dashboard | `IndexController::indexAction` empty | Stub |
| User profile page | `UsersController::profileAction` empty | Stub |
| Load-in page | `LoadinController::indexAction` empty. Unauthenticated users are sent to `/companies/login/`, which has no action | Stub |
| Walk-ins | `WalkinsController` `index` and `world` empty. Layout disabled. No auth | Stub |
| Monstor | `MonstorController` same shape as walk-ins. View `monstor/world.phtml` | Stub |
| Authon | `AuthonController` `index`, `test` (exits), `newcompany` empty. Views under `authon/` | Stub |
| Organisation profile | `main_menu.phtml` links `/organisation/profile`. View file `organisation/profile.phtml` exists. No `OrganisationController` | Unreachable by the default router |
| Employees menu | `main_menu.phtml` only. href `#`. This partial is not included by `default.phtml` | Not wired |
| Accreditation add | `AccreditationController::addAction` disables layout and stops | Stub |
| Event add screen | `EventsController::addAction` only disables the layout | Stub |
| Add permit from events | `EventsController::addpermitAction` loads accreditation `AC` 44 through `Model_Events::getEvent` (joins missing table `Company_Events`) and missing class `Model_CompanyEvents` | Started, cannot run from this tree |
| Permit email via Footprint | `postEmailToFp` implemented; call commented out | Dormant |
| Zone capacity statistics | Large block inside `/* */` in `EventsController::getpermitsAction` | Not executed |
| Index test lookup | `IndexController::testAction` prints a user row for a hardcoded identity number | Debug action, still routed, requires login |

## Planned features

No roadmap, TODO file, ticket export, or "phase 2" document is in the repository. `application.ini` contains layout keys `admin`, `union`, `referee`, `gir`, and `accreditations`. Only `default.phtml` and `layout.phtml` exist. Those keys are not a written plan. Provenance: **Unknown** whether they were intended future layouts or leftovers.

`library/PG` contains `MatchReport.php`, `MatchreportController.php`, and `RPK.php`. Nothing in `application/` instantiates them. Provenance: **Inferred** leftover from another product (the plugin file names a different author). Not a planned Magus feature.

## Recently changed

Relative to the initial application commit on 2019-03-15, the only later commit (`f806a7e`, 2019-08-19) changes root `.htaccess` and `application/configs/application.ini`. Database host, user, password, and name in the tip revision are localhost / root / empty / `magus`.

`9b5b3e2` the same day as the import is the commit that introduced connection details and trimmed `application/modules/default/Bootstrap.php`.

## Deprecated or removed

Nothing in git deletes a feature after the import. The following are present but unused or superseded:

| Item | Evidence | Reading |
|---|---|---|
| `application/layouts/layout.phtml` | Stylesheets point at `/assets_old/`. INI and the layout picker select `default` | Older shell, not selected |
| `views/scripts/users/Copy of add.phtml` | Filename | Copy left beside `users/add.phtml` |
| `views/scripts/events/Copy of accreditation.phtml`, `Copy of getpermit.phtml`, `Copy of loadin.phtml` | Filenames | Copies |
| `Events` table | Same columns as `Accreditation_List`, no model | Superseded by `Accreditation_List` for `Model_Events`, or an unused twin. **Requires confirmation** |
| Commented maintenance page | `public/index.php` lines 2–5 | Not active |
| Commented Footprint send | `PermitsController::addpermitAction` | Not active |
| `.gitignore` entries for Composer, Doctrine, and `config/autoload/*.local.php` | No Composer or Doctrine app code | Template ignore file, not this app's layout |

## Scan-host files that are not features in git

`sonar-project.properties` and `sonarqube_scan.bat` were listed at the repository root when the onboarding task was created. They are not in `master`. They are not documented as product features.
