# Hobbesgram — Changelog ## v1.12 ### Mirroring infrastructure - **`/catalog.json`** — public endpoint (no credentials required) that serves a full JSON manifest of every approved file. Each entry includes title, description, category path, size, uploader, version, author, license, requirements, tags, download count, and absolute `download_url`, `meta_url`, and `info_url`. Response carries `Cache-Control: public, max-age=300` and `Access-Control-Allow-Origin: *`. - **`/download/{path}.json` metadata sidecars** — every file exposes its metadata at the download URL with `.json` appended (e.g. `/download/utils/archivers/unzip.zip.json`). Always public regardless of the site's auth settings. Mirrors can fetch the binary (credentials required if the site enforces them) and the sidecar (always open) in one pass — the same `.zip` + `.zip.json` pairing used by the Archive.org bulk item upload. - **`/mirror` page** — public-facing instructions page with the catalog URL, per-file sidecar pattern, `wget`/`curl` examples, and a copy-paste shell script for bulk mirroring (requires `wget` and `jq`). - **`file_public_meta(array $meta, string $base = '')`** added to `includes/functions.php`. Strips internal fields (`stored_name`, `archiveorg_*`) and appends computed `download_url`, `meta_url`, and `info_url`. Accepts an optional absolute URL prefix. - **`.htaccess`** created for v1.12 (based on v1.01). Comment clarifies why the `FilesMatch "\.(json|ini)$"` block does not affect virtual routes (`/catalog.json`, `*.zip.json`): those rewrite to `index.php` before Apache's authorization phase evaluates `FilesMatch`. - **Access gate** exemption in `index.php` — `.json`-suffixed requests under `/download/` bypass the auth gate via `$is_public_meta`, so sidecars are always accessible even when binary downloads require a login. ### Category slug stability - Renaming a category in **Admin → Categories** no longer regenerates its slug. The slug — and therefore every file URL stored under that category — is fixed at creation time and never altered by a rename. ### Contributor upload category limits - **`upload_category` field** on user records — single category ID that restricts a contributor to submitting only to that category. Empty string means no per-user restriction. - **Global default** (`contributor_category` in `settings.json`, `config.php` `DEFAULT_SETTINGS`) — set from **Admin → Site Settings**. Applies to every contributor with no per-user override. - **Priority chain**: per-user `upload_category` → global `contributor_category` → no restriction (any category). - **Per-user override page** `/admin/user-limits/{username}` — single dropdown showing full category paths (e.g. `Utilities › Archivers`). Selecting "No restriction" clears the override. Only affects the `contributor` role; editors and admins are unaffected. - **Admin → Users** — new "Cat. Access" column shows the restricted category name or "All" for each contributor. A "Limits" button (contributor rows only) links to the per-user limits page. - **Upload form** — when a restriction is active the category field renders as a locked read-only input; a hidden `` carries the value for submission. Server-side validation rejects any submission to a different category even if the form is tampered with. ### Pool approval workflow - **Inline edit + approve** — web-upload items in `/pool` now show a full editable form (title, description, author, version, homepage, category, OS/2 version, license, requirements, tags) pre-filled from the contributor's submission. The editor reviews and edits everything in place, then clicks **Approve** once. The separate "Edit Metadata" step has been removed. - **Category override on approval** — changing the category before approving moves the physical file on disk to the new category directory and updates `stored_name` in the metadata record, consistent with the post-approval edit flow in `file/edit.php`. - **Submitted-by line** — each pool item shows "Submitted by *username* to *category path*" so the editor can compare the contributor's original intent with the category selected in the form. - **Reject form** is a separate `