ver. 0.307: check-update button + auto-generated changelog

- Add "Sprawdź aktualizacje" refresh button in admin sidebar (AJAX check without page reload)
- Add UpdateController::checkUpdate() action clearing session cache and querying update server
- Replace hand-edited changelog.php with auto-generating script (reads manifests + legacy JSON)
- Migrate all legacy changelog entries (0.300-0.001) to changelog-legacy.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 18:01:12 +01:00
parent 0b1f289478
commit 708a941f13
6 changed files with 1609 additions and 745 deletions

View File

@@ -49,4 +49,17 @@ class UpdateController
echo json_encode( $response );
exit;
}
public function checkUpdate(): void
{
\Shared\Helpers\Helpers::set_session( 'new-version', null );
$newVer = \Shared\Helpers\Helpers::get_new_version();
$curVer = \Shared\Helpers\Helpers::get_version();
echo json_encode( [
'has_update' => $newVer > $curVer,
'new_ver' => $newVer,
] );
exit;
}
}