feat(updater): Update-Prüfung nach Installation oder Versionswechsel neu auslösen, Version 1.0.5

Eine Installation löscht das gespeicherte Update-Ergebnis; eine Prüfung, die läuft, solange das Plugin
nicht geladen ist, speichert eines ohne das Plugin, und der Schalter für automatische Updates fehlt bis
zu eine Stunde. RecheckOnInstall vergisst das Ergebnis beim ersten admin_init mit der neuen Version
(Priorität 5, vor _maybe_update_plugins des Core), der es dann mit registriertem GiteaUpdater neu aufbaut.
Die Option lit_mcp_installed_version räumt der Uninstaller auf.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Niclas Loosen
2026-11-04 15:36:30 +01:00
co-authored by Claude Sonnet 5.5
parent 62292a4846
commit 9f7c2d9aba
8 changed files with 104 additions and 5 deletions
+3 -1
View File
@@ -38,6 +38,7 @@ use LIT\MCP\Server\RequestContext;
use LIT\MCP\Server\ServerRegistrar;
use LIT\MCP\Server\VisibilityFilter;
use LIT\MCP\Updater\GiteaUpdater;
use LIT\MCP\Updater\RecheckOnInstall;
defined('ABSPATH') || exit;
@@ -46,7 +47,7 @@ defined('ABSPATH') || exit;
*/
final class Plugin
{
public const VERSION = '1.0.4';
public const VERSION = '1.0.5';
private static string $pluginFile = '';
private static ?SettingsPage $settingsPage = null;
@@ -57,6 +58,7 @@ final class Plugin
// Before the dependency check: a plugin that is inactive for a missing dependency must still be updatable.
(new GiteaUpdater(plugin_basename($pluginFile), dirname($pluginFile)))->register();
(new RecheckOnInstall(self::VERSION))->register();
$missing = (new Dependencies())->missing();
if ($missing !== []) {