Skip to content

Add version check page with changelog for global admins - #1006

Merged
DavidGoodwin merged 5 commits into
postfixadmin:masterfrom
knofte:add-version-check
Apr 6, 2026
Merged

Add version check page with changelog for global admins#1006
DavidGoodwin merged 5 commits into
postfixadmin:masterfrom
knofte:add-version-check

Conversation

@knofte

@knofte knofte commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Adds a read-only version check page for global admins that queries the GitHub Releases API and displays available updates with changelogs.

Split out from #1000 based on review feedback - this PR contains only the version check, no self-update functionality.

What it does:

  • Compares $CONF['version'] against GitHub releases
  • Shows all newer versions with release notes
  • Links to the release on GitHub
  • Accessible from admin menu and footer "check update" link
  • Uses cURL with file_get_contents fallback
  • Degrades gracefully to a plain GitHub releases link if HTTP is blocked

What it doesn't do:

  • No file downloads, no file writes, no self-update
  • No config option needed - read-only and admin-only

Review feedback addressed from #1000:

  • Proper language strings in en.lang instead of |default: fallbacks
  • No security concerns (read-only, no writable webroot needed)

Two commits for easy review.

knofte added 2 commits April 2, 2026 06:16
Queries the GitHub Releases API to show available updates with
changelogs. Read-only, no file writes or self-update functionality.
Degrades to a GitHub releases link if HTTP requests are blocked.
Copilot AI review requested due to automatic review settings April 2, 2026 06:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an admin-only “Update Check” page that queries GitHub Releases and shows newer versions and release notes, plus navigation links for global admins to access it.

Changes:

  • Added public/update-check.php to fetch GitHub releases, compare against the running version, and pass update/changelog data to Smarty.
  • Added templates/update-check.tpl to render current version, update availability, and a changelog list.
  • Wired the page into the UI via admin menu + footer link, and introduced new English language strings.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
public/update-check.php Implements GitHub Releases API fetch + version comparison and passes results to the template.
templates/update-check.tpl Renders update status, links to GitHub, and changelog output.
templates/menu.tpl Adds “Update Check” nav entry for global admins.
templates/index.tpl Routes footer “check update” link to the in-app page for global admins.
configs/menu.conf Adds url_update_check mapping used by menu template.
languages/en.lang Adds English UI strings for the update-check page.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread languages/en.lang
Comment thread public/update-check.php Outdated
Comment thread public/update-check.php
Comment thread templates/index.tpl Outdated
Comment thread public/update-check.php

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread public/update-check.php
Comment thread public/update-check.php
@DavidGoodwin

Copy link
Copy Markdown
Member

if I mess with my local version number in update-check.php, this seems to work as expected....

image

@DavidGoodwin
DavidGoodwin merged commit 0b462e2 into postfixadmin:master Apr 6, 2026
@DavidGoodwin

Copy link
Copy Markdown
Member

thanks @knofte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants