From 833fd7b7bfc95db38289fed4677ab7a074e49f7a Mon Sep 17 00:00:00 2001
From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech>
Date: Sun, 7 Jun 2026 16:37:48 +0000
Subject: [PATCH] feat: add migration complete message to postflight
---
source/script.php | 39 +++++++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/source/script.php b/source/script.php
index 0573c5a..ee595ff 100644
--- a/source/script.php
+++ b/source/script.php
@@ -36,8 +36,15 @@ class Pkg_MokowaasInstallerScript
{
$app = Factory::getApplication();
+ $app->enqueueMessage(
+ 'MokoWaaS → MokoSuite Migration
'
+ . 'Beginning migration from MokoWaaS to MokoSuite. '
+ . 'Downloading MokoSuite package...',
+ 'notice'
+ );
+
// Download the MokoSuite package
- $tmpPath = Factory::getApplication()->get('tmp_path', sys_get_temp_dir());
+ $tmpPath = $app->get('tmp_path', sys_get_temp_dir());
$zipFile = $tmpPath . '/pkg_mokosuite_migration.zip';
// Append dlid if we have one
@@ -56,7 +63,7 @@ class Pkg_MokowaasInstallerScript
if ($response->code !== 200)
{
$app->enqueueMessage(
- 'MokoSuite migration: Failed to download package (HTTP ' . $response->code . '). '
+ 'Migration Failed — Could not download MokoSuite package (HTTP ' . $response->code . '). '
. 'Please install MokoSuite manually from the Joomla extension manager.',
'error'
);
@@ -69,7 +76,7 @@ class Pkg_MokowaasInstallerScript
catch (\Throwable $e)
{
$app->enqueueMessage(
- 'MokoSuite migration: Download failed — ' . $e->getMessage() . '. '
+ 'Migration Failed — Download error: ' . $e->getMessage() . '. '
. 'Please install MokoSuite manually.',
'error'
);
@@ -85,17 +92,29 @@ class Pkg_MokowaasInstallerScript
if ($result)
{
+ // Transfer the download key to the new MokoSuite update site
+ $this->restoreDownloadKey();
+
$app->enqueueMessage(
- 'MokoSuite installed successfully! '
- . 'Your MokoWaaS installation has been migrated to MokoSuite. '
- . 'All settings, tickets, and data have been preserved.',
+ '
'
+ . 'Your MokoWaaS installation has been successfully migrated to MokoSuite.
'
+ . '• All plugin settings have been preserved
'
+ . '• Database tables have been migrated
'
+ . '• Helpdesk tickets and data are intact
'
+ . '• Your license key has been transferred
'
+ . 'MokoWaaS extensions have been removed. Future updates will come from MokoSuite.'
+ . '