From 4805a377c40710288a3ca670dbb17adb174308f0 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Wed, 28 Dec 2022 10:56:11 +0100 Subject: [PATCH] Automatic update plugins at upgrade? --- snappymail/v/0.0.0/setup.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/snappymail/v/0.0.0/setup.php b/snappymail/v/0.0.0/setup.php index c74f4ee9b..577ca8d87 100644 --- a/snappymail/v/0.0.0/setup.php +++ b/snappymail/v/0.0.0/setup.php @@ -166,4 +166,16 @@ if (defined('APP_VERSION')) file_put_contents($sFile, json_encode($config, JSON_PRETTY_PRINT)); } } + +/* + // Update plugins + $asApi = !empty($_ENV['SNAPPYMAIL_INCLUDE_AS_API']); + $_ENV['SNAPPYMAIL_INCLUDE_AS_API'] = true; + $aList = \SnappyMail\Repository::getEnabledPackagesNames(); + foreach ($aList as $sId) { + \SnappyMail\Repository::installPackage('plugin', $sId); + } + $_ENV['SNAPPYMAIL_INCLUDE_AS_API'] = $asApi; +*/ + }