Updates

Self-updating

Pressline pulls release zips directly from a GitHub repo. Default: maskalix/PressLine. Override with the update_repo webset key if you fork.

Apply flow

  1. Download https://github.com/<repo>/archive/refs/tags/<tag>.zip
  2. Validate the zip (ZipArchive::open)
  3. Extract to a tmp directory, find the top-level wrapper
  4. Back up the files that will be replaced
  5. Copy the new files into PL_ROOT
  6. Roll back from the backup on copy errors
  7. Write the new version.php
  8. Run pl_schema_apply() — idempotent, safe to re-run
  9. Append to update_history (ring buffer, 10 entries)

Preserved files

Never overwritten by an update:

  • pl-config.php
  • media/
  • plugins/
  • .installed
  • .htaccess
  • PHPMailer/
  • instalace/

Permission model

Viewing updates needs admin_level. Applying them needs dev_level. CSRF is enforced.

Caching

The latest-release lookup is cached for an hour in webset.update_cache. Force a refresh from the admin.