diff --git a/.mokogitea/manifest.xml b/.mokogitea/manifest.xml index 9a47c6a..07d7424 100644 --- a/.mokogitea/manifest.xml +++ b/.mokogitea/manifest.xml @@ -9,7 +9,7 @@ Package - MokoWaaS MokoConsulting White-label identity, security hardening, and tenant restriction layer for WaaS-managed Joomla environments - 02.29.04 + 02.30.00 GNU General Public License v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index d388f3e..090b769 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ INGROUP: MokoWaaS.Documentation REPO: https://github.com/mokoconsulting-tech/mokowaas PATH: ./CHANGELOG.md - VERSION: 02.29.04 + VERSION: 02.30.00 BRIEF: Version history using `Keep a Changelog` --> @@ -24,11 +24,14 @@ - License key support via Joomla's native Update Sites download key system (dlid) - Update server URL migrated from static XML to MokoGitea's dynamic update feed endpoint - Legacy static update site URLs auto-migrated to dynamic endpoint on install/update +- Persistent admin warning when no license key is configured in Update Sites +- Daily heartbeat validation of license key against MokoGitea — warns if key is invalid or expired +- Stale/duplicate update site cleanup on install/update (removes old static URL entries and orphaned records) ### Removed - Static `updates.xml` — update feed is now generated dynamically by MokoGitea from git releases -## [02.29.04] - 2026-05-31 +## [02.30.00] - 2026-05-31 ### Fixed - Remove secondary master username from enforcement — only primary master user is created/enforced diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 92abd57..ccbdbf2 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,7 +14,7 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS.Documentation REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: ./CODE_OF_CONDUCT.md BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default --> diff --git a/GOVERNANCE.md b/GOVERNANCE.md index d29973b..e70b7f3 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -19,7 +19,7 @@ DEFGROUP: mokoconsulting-tech.MokoWaaSBrand INGROUP: MokoStandards.Governance REPO: https://github.com/mokoconsulting-tech/MokoWaaSBrand - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /GOVERNANCE.md BRIEF: Project governance rules, roles, and decision process for MokoWaaSBrand --> diff --git a/LICENSE.md b/LICENSE.md index 67cb9c8..0221cac 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -15,7 +15,7 @@ INGROUP: MokoWaaS.Documentation REPO: https://github.com/mokoconsulting-tech/mokowaas PATH: ./LICENSE.md - VERSION: 02.29.04 + VERSION: 02.30.00 BRIEF: Project license (GPL-3.0-or-later) --> GNU GENERAL PUBLIC LICENSE diff --git a/README.md b/README.md index 104d98f..7b90340 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /README.md BRIEF: MokoWaaS platform plugin for Joomla --> diff --git a/SECURITY.md b/SECURITY.md index 8f5c4c8..4799b17 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME] INGROUP: [PROJECT_NAME].Documentation REPO: [REPOSITORY_URL] PATH: /SECURITY.md -VERSION: 02.29.04 +VERSION: 02.30.00 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/docs/guides/build-guide.md b/docs/guides/build-guide.md index 6467f25..3bfac48 100644 --- a/docs/guides/build-guide.md +++ b/docs/guides/build-guide.md @@ -11,13 +11,13 @@ INGROUP: MokoWaaS.Build REPO: https://github.com/mokoconsulting-tech/mokowaas FILE: build-guide.md - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /docs/guides/ BRIEF: Build and packaging guide for the MokoWaaS system plugin NOTE: Defines environment setup, repository layout, packaging rules, and release preparation --> -# MokoWaaS Build Guide (VERSION: 02.29.04) +# MokoWaaS Build Guide (VERSION: 02.30.00) ## 1. Purpose diff --git a/docs/guides/configuration-guide.md b/docs/guides/configuration-guide.md index 405502a..15bd12e 100644 --- a/docs/guides/configuration-guide.md +++ b/docs/guides/configuration-guide.md @@ -10,13 +10,13 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS.Guides REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /docs/guides/configuration-guide.md BRIEF: Configuration guide for the MokoWaaS system plugin NOTE: Defines plugin parameters, expected behaviors, and recommended defaults --> -# MokoWaaS Configuration Guide (VERSION: 02.29.04) +# MokoWaaS Configuration Guide (VERSION: 02.30.00) ## 1. Objective diff --git a/docs/guides/installation-guide.md b/docs/guides/installation-guide.md index 71656f9..e6197f3 100644 --- a/docs/guides/installation-guide.md +++ b/docs/guides/installation-guide.md @@ -10,13 +10,13 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS.Guides REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /docs/guides/installation-guide.md BRIEF: Installation guide for the MokoWaaS system plugin NOTE: First document in the guide set --> -# MokoWaaS Installation Guide (VERSION: 02.29.04) +# MokoWaaS Installation Guide (VERSION: 02.30.00) ## Introduction diff --git a/docs/guides/operations-guide.md b/docs/guides/operations-guide.md index 4e7eca3..9bcce8c 100644 --- a/docs/guides/operations-guide.md +++ b/docs/guides/operations-guide.md @@ -10,13 +10,13 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS.Guides REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /docs/guides/operations-guide.md BRIEF: Operational guide for administering and managing the MokoWaaS system plugin NOTE: Defines lifecycle, responsibilities, and operational behaviors --> -# MokoWaaS Operations Guide (VERSION: 02.29.04) +# MokoWaaS Operations Guide (VERSION: 02.30.00) ## Introduction diff --git a/docs/guides/rollback-and-recovery-guide.md b/docs/guides/rollback-and-recovery-guide.md index 138e84d..719e032 100644 --- a/docs/guides/rollback-and-recovery-guide.md +++ b/docs/guides/rollback-and-recovery-guide.md @@ -10,13 +10,13 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS.Guides REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /docs/guides/rollback-and-recovery-guide.md BRIEF: Rollback and recovery guide for restoring stable operation after plugin related incidents NOTE: Completes the core guide set for WaaS plugin governance --> -# MokoWaaS Rollback and Recovery Guide (VERSION: 02.29.04) +# MokoWaaS Rollback and Recovery Guide (VERSION: 02.30.00) ## Introduction diff --git a/docs/guides/testing-guide.md b/docs/guides/testing-guide.md index 5368bf8..991b9e6 100644 --- a/docs/guides/testing-guide.md +++ b/docs/guides/testing-guide.md @@ -7,13 +7,13 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS.Guides REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /docs/guides/testing-guide.md BRIEF: Testing guide for MokoWaaS v02.01.08 NOTE: Covers manual test procedures for language overrides, install/uninstall, and configuration --> -# MokoWaaS Testing Guide (VERSION: 02.29.04) +# MokoWaaS Testing Guide (VERSION: 02.30.00) ## 1. Prerequisites diff --git a/docs/guides/troubleshooting-guide.md b/docs/guides/troubleshooting-guide.md index 92b5f27..fd189b6 100644 --- a/docs/guides/troubleshooting-guide.md +++ b/docs/guides/troubleshooting-guide.md @@ -10,13 +10,13 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS.Guides REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /docs/guides/troubleshooting-guide.md BRIEF: Troubleshooting guide for diagnosing and resolving issues related to the MokoWaaS plugin NOTE: Designed for administrators and WaaS operations teams --> -# MokoWaaS Troubleshooting Guide (VERSION: 02.29.04) +# MokoWaaS Troubleshooting Guide (VERSION: 02.30.00) ## Introduction diff --git a/docs/guides/upgrade-and-versioning-guide.md b/docs/guides/upgrade-and-versioning-guide.md index 927a323..1d92656 100644 --- a/docs/guides/upgrade-and-versioning-guide.md +++ b/docs/guides/upgrade-and-versioning-guide.md @@ -10,13 +10,13 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS.Guides REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /docs/guides/upgrade-and-versioning-guide.md BRIEF: Guide for updating, versioning, and maintaining the MokoWaaS plugin NOTE: Defines release flow, version rules, and upgrade validation --> -# MokoWaaS Upgrade and Versioning Guide (VERSION: 02.29.04) +# MokoWaaS Upgrade and Versioning Guide (VERSION: 02.30.00) ## Introduction diff --git a/docs/index.md b/docs/index.md index 835d6b5..0182eb8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,13 +10,13 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS.Documentation REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /docs/index.md BRIEF: Master index of all documentation for the MokoWaaS plugin NOTE: Automatically maintained index for all guide canvases --> -# MokoWaaS Documentation Index (VERSION: 02.29.04) +# MokoWaaS Documentation Index (VERSION: 02.30.00) ## Introduction diff --git a/docs/plugin-basic.md b/docs/plugin-basic.md index 89d45f7..00fbccd 100644 --- a/docs/plugin-basic.md +++ b/docs/plugin-basic.md @@ -11,12 +11,12 @@ INGROUP: MokoWaaS REPO: https://github.com/mokoconsulting-tech/mokowaas PATH: /docs/plugin-basic.md - VERSION: 02.29.04 + VERSION: 02.30.00 BRIEF: Baseline documentation for the MokoWaaS system plugin NOTE: Foundational reference for internal and external stakeholders --> -# MokoWaaS Plugin Overview (VERSION: 02.29.04) +# MokoWaaS Plugin Overview (VERSION: 02.30.00) ## Introduction diff --git a/docs/update-server.md b/docs/update-server.md index 45cdd83..f9dd949 100644 --- a/docs/update-server.md +++ b/docs/update-server.md @@ -10,7 +10,7 @@ DEFGROUP: MokoWaaS.Documentation INGROUP: MokoStandards.Templates REPO: https://github.com/mokoconsulting-tech/MokoWaaS PATH: /docs/update-server.md -VERSION: 02.29.04 +VERSION: 02.30.00 BRIEF: How this extension's Joomla update server file (update.xml) is managed --> diff --git a/src/packages/com_mokowaas/mokowaas.xml b/src/packages/com_mokowaas/mokowaas.xml index 59500bd..9c5be93 100644 --- a/src/packages/com_mokowaas/mokowaas.xml +++ b/src/packages/com_mokowaas/mokowaas.xml @@ -7,8 +7,8 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 02.29.04 - 02.29.04 + 02.30.00 + 02.30.00 Minimal API-only component for MokoWaaS. Provides REST endpoints for site health, cache, updates, and backups. Moko\Component\MokoWaaS\Api diff --git a/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php b/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php index 8893b62..626896b 100644 --- a/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php +++ b/src/packages/plg_system_mokowaas/Extension/MokoWaaS.php @@ -22,7 +22,7 @@ * DEFGROUP: Joomla.Plugin * INGROUP: MokoWaaS * REPO: https://github.com/mokoconsulting-tech/mokowaas - * VERSION: 02.29.04 + * VERSION: 02.30.00 * PATH: /src/Extension/MokoWaaS.php * NOTE: Handles Joomla system events for rebranding functionality */ @@ -1000,6 +1000,7 @@ class MokoWaaS extends CMSPlugin implements BootableExtensionInterface return; } + $this->warnMissingLicenseKey(); $this->enforceAdminRestrictions(); $this->protectPlugin(); } @@ -3926,6 +3927,124 @@ class MokoWaaS extends CMSPlugin implements BootableExtensionInterface // ------------------------------------------------------------------ // Heartbeat (called from onExtensionAfterSave) + // ------------------------------------------------------------------ + // License key check (called from onAfterRoute) + // ------------------------------------------------------------------ + + /** + * Show a persistent admin warning if no license key is set on the + * MokoWaaS update site. + * + * Checks the extra_query column in #__update_sites for a dlid value. + * Also validates the key against MokoGitea on a heartbeat interval + * (once per day) and warns if the key is invalid or expired. + * + * @return void + * + * @since 02.30.00 + */ + protected function warnMissingLicenseKey(): void + { + // Only show to master users + if (!$this->isMasterUser()) + { + return; + } + + try + { + $db = Factory::getDbo(); + + $query = $db->getQuery(true) + ->select($db->quoteName('extra_query')) + ->from($db->quoteName('#__update_sites')) + ->where('(' . $db->quoteName('name') . ' LIKE ' . $db->quote('%MokoWaaS%') + . ' OR ' . $db->quoteName('location') . ' LIKE ' . $db->quote('%MokoWaaS%') . ')') + ->setLimit(1); + $db->setQuery($query); + $extraQuery = (string) $db->loadResult(); + + if (empty($extraQuery) || strpos($extraQuery, 'dlid=') === false) + { + $this->app->enqueueMessage( + 'MokoWaaS License Key Required — ' + . 'No download key is configured. Updates will not be available until a valid license key is entered. ' + . 'Go to System → Update Sites ' + . 'and enter your license key (MOKO-XXXX-XXXX-XXXX-XXXX) in the Download Key field for the MokoWaaS update site.', + 'warning' + ); + + return; + } + + // Extract the key value from extra_query + parse_str($extraQuery, $parsed); + $licenseKey = $parsed['dlid'] ?? ''; + + if (empty($licenseKey)) + { + return; + } + + // Heartbeat validation — check once per day + $session = Factory::getSession(); + $lastCheck = (int) $session->get('mokowaas.license_check', 0); + $now = time(); + + if (($now - $lastCheck) < 86400) + { + // Show cached warning if key was invalid last check + if ($session->get('mokowaas.license_invalid', false)) + { + $this->app->enqueueMessage( + 'MokoWaaS License Key Invalid — ' + . 'Your license key could not be validated. Please verify your key in ' + . 'System → Update Sites.', + 'error' + ); + } + + return; + } + + // Validate against MokoGitea + $session->set('mokowaas.license_check', $now); + + $validateUrl = 'https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/updates.xml' + . '?dlid=' . urlencode($licenseKey) + . '&domain=' . urlencode(Uri::root()); + + $ch = curl_init($validateUrl); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + $response = curl_exec($ch); + $httpCode = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + // Empty or non-200 means invalid key + $isValid = ($httpCode === 200 && $response && strpos($response, '') !== false); + + $session->set('mokowaas.license_invalid', !$isValid); + + if (!$isValid) + { + $this->app->enqueueMessage( + 'MokoWaaS License Key Invalid — ' + . 'Your license key could not be validated. Updates will not be available. ' + . 'Please verify your key in ' + . 'System → Update Sites.', + 'error' + ); + } + } + catch (\Throwable $e) + { + // Silent — license check is non-critical + } + } + // ------------------------------------------------------------------ /** diff --git a/src/packages/plg_system_mokowaas/Field/AllowedIpsField.php b/src/packages/plg_system_mokowaas/Field/AllowedIpsField.php index ab057c3..d1f97ff 100644 --- a/src/packages/plg_system_mokowaas/Field/AllowedIpsField.php +++ b/src/packages/plg_system_mokowaas/Field/AllowedIpsField.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: Joomla.Plugin * INGROUP: MokoWaaS - * VERSION: 02.29.04 + * VERSION: 02.30.00 * PATH: /src/Field/AllowedIpsField.php * BRIEF: Custom form field that displays the current IP whitelist */ diff --git a/src/packages/plg_system_mokowaas/Field/CopyableTokenField.php b/src/packages/plg_system_mokowaas/Field/CopyableTokenField.php index 15bdb57..7b6ac34 100644 --- a/src/packages/plg_system_mokowaas/Field/CopyableTokenField.php +++ b/src/packages/plg_system_mokowaas/Field/CopyableTokenField.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: Joomla.Plugin * INGROUP: MokoWaaS - * VERSION: 02.29.04 + * VERSION: 02.30.00 * PATH: /src/Field/CopyableTokenField.php * BRIEF: Read-only token field with a copy-to-clipboard button */ diff --git a/src/packages/plg_system_mokowaas/Field/CurrentIpField.php b/src/packages/plg_system_mokowaas/Field/CurrentIpField.php index 6764abd..4e195a2 100644 --- a/src/packages/plg_system_mokowaas/Field/CurrentIpField.php +++ b/src/packages/plg_system_mokowaas/Field/CurrentIpField.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: Joomla.Plugin * INGROUP: MokoWaaS - * VERSION: 02.29.04 + * VERSION: 02.30.00 * PATH: /src/Field/CurrentIpField.php * BRIEF: Read-only field that displays the current user's IP address */ diff --git a/src/packages/plg_system_mokowaas/Field/DemoTaskInfoField.php b/src/packages/plg_system_mokowaas/Field/DemoTaskInfoField.php index f1014d3..2d3727e 100644 --- a/src/packages/plg_system_mokowaas/Field/DemoTaskInfoField.php +++ b/src/packages/plg_system_mokowaas/Field/DemoTaskInfoField.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: Joomla.Plugin * INGROUP: MokoWaaS - * VERSION: 02.29.04 + * VERSION: 02.30.00 * PATH: /src/Field/DemoTaskInfoField.php * BRIEF: Read-only field showing scheduled task info with link to manage it */ diff --git a/src/packages/plg_system_mokowaas/Field/NextResetField.php b/src/packages/plg_system_mokowaas/Field/NextResetField.php index 5475afa..36c578e 100644 --- a/src/packages/plg_system_mokowaas/Field/NextResetField.php +++ b/src/packages/plg_system_mokowaas/Field/NextResetField.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: Joomla.Plugin * INGROUP: MokoWaaS - * VERSION: 02.29.04 + * VERSION: 02.30.00 * PATH: /src/Field/NextResetField.php * BRIEF: Read-only field showing next reset time from Joomla scheduled task */ diff --git a/src/packages/plg_system_mokowaas/Field/SnapshotTablesField.php b/src/packages/plg_system_mokowaas/Field/SnapshotTablesField.php index 4a63a19..af78e12 100644 --- a/src/packages/plg_system_mokowaas/Field/SnapshotTablesField.php +++ b/src/packages/plg_system_mokowaas/Field/SnapshotTablesField.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: Joomla.Plugin * INGROUP: MokoWaaS - * VERSION: 02.29.04 + * VERSION: 02.30.00 * PATH: /src/Field/SnapshotTablesField.php * BRIEF: Multi-select list field that loads DB tables with sensible defaults */ diff --git a/src/packages/plg_system_mokowaas/Service/ContentSyncReceiver.php b/src/packages/plg_system_mokowaas/Service/ContentSyncReceiver.php index 7004158..1da92bc 100644 --- a/src/packages/plg_system_mokowaas/Service/ContentSyncReceiver.php +++ b/src/packages/plg_system_mokowaas/Service/ContentSyncReceiver.php @@ -10,7 +10,7 @@ * INGROUP: MokoWaaS * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS * PATH: /src/packages/plg_system_mokowaas/Service/ContentSyncReceiver.php - * VERSION: 02.29.04 + * VERSION: 02.30.00 * BRIEF: Receiver-side content sync — applies incoming payload to local DB */ diff --git a/src/packages/plg_system_mokowaas/Service/ContentSyncService.php b/src/packages/plg_system_mokowaas/Service/ContentSyncService.php index b1eb773..ac63614 100644 --- a/src/packages/plg_system_mokowaas/Service/ContentSyncService.php +++ b/src/packages/plg_system_mokowaas/Service/ContentSyncService.php @@ -10,7 +10,7 @@ * INGROUP: MokoWaaS * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS * PATH: /src/packages/plg_system_mokowaas/Service/ContentSyncService.php - * VERSION: 02.29.04 + * VERSION: 02.30.00 * BRIEF: Sender-side content sync — builds payload and pushes to remote sites */ diff --git a/src/packages/plg_system_mokowaas/Service/DemoResetService.php b/src/packages/plg_system_mokowaas/Service/DemoResetService.php index 4696842..aabdb54 100644 --- a/src/packages/plg_system_mokowaas/Service/DemoResetService.php +++ b/src/packages/plg_system_mokowaas/Service/DemoResetService.php @@ -10,7 +10,7 @@ * INGROUP: MokoWaaS * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS * PATH: /src/packages/plg_system_mokowaas/Service/DemoResetService.php - * VERSION: 02.29.04 + * VERSION: 02.30.00 * BRIEF: Content-only snapshot/restore for demo site reset */ diff --git a/src/packages/plg_system_mokowaas/mokowaas.xml b/src/packages/plg_system_mokowaas/mokowaas.xml index 8f4d215..55df8a4 100644 --- a/src/packages/plg_system_mokowaas/mokowaas.xml +++ b/src/packages/plg_system_mokowaas/mokowaas.xml @@ -16,7 +16,7 @@ DEFGROUP: Joomla.Plugin INGROUP: MokoWaaS REPO: https://github.com/mokoconsulting-tech/mokowaas - VERSION: 02.29.04 + VERSION: 02.30.00 PATH: /src/mokowaas.xml BRIEF: Plugin manifest for MokoWaaS system plugin NOTE: Defines installation metadata, files, and configuration for Joomla @@ -30,8 +30,8 @@ GNU General Public License version 3 or later; see LICENSE.md hello@mokoconsulting.tech https://mokoconsulting.tech - 02.29.04 - 02.29.04 + 02.30.00 + 02.30.00 This plugin rebrands the Joomla system interface with MokoWaaS identity. It applies language overrides and ensures consistent branding across the platform. Moko\Plugin\System\MokoWaaS script.php diff --git a/src/packages/plg_system_mokowaas/script.php b/src/packages/plg_system_mokowaas/script.php index 91d2bac..408c832 100644 --- a/src/packages/plg_system_mokowaas/script.php +++ b/src/packages/plg_system_mokowaas/script.php @@ -22,7 +22,7 @@ * DEFGROUP: Joomla.Plugin * INGROUP: MokoWaaS * REPO: https://github.com/mokoconsulting-tech/mokowaas - * VERSION: 02.29.04 + * VERSION: 02.30.00 * PATH: /src/script.php * BRIEF: Installation script for MokoWaaS plugin * NOTE: Handles installation, update, and uninstallation tasks including language override deployment diff --git a/src/packages/plg_system_mokowaas/services/provider.php b/src/packages/plg_system_mokowaas/services/provider.php index 18efa86..a79c981 100644 --- a/src/packages/plg_system_mokowaas/services/provider.php +++ b/src/packages/plg_system_mokowaas/services/provider.php @@ -22,7 +22,7 @@ * DEFGROUP: Joomla.Plugin * INGROUP: MokoWaaS * REPO: https://github.com/mokoconsulting-tech/mokowaas - * VERSION: 02.29.04 + * VERSION: 02.30.00 * PATH: /src/services/provider.php * BRIEF: Service provider for dependency injection in Joomla 5.x * NOTE: Registers the plugin with Joomla's DI container diff --git a/src/packages/plg_task_mokowaasdemo/mokowaasdemo.xml b/src/packages/plg_task_mokowaasdemo/mokowaasdemo.xml index 59df7fb..c92118a 100644 --- a/src/packages/plg_task_mokowaasdemo/mokowaasdemo.xml +++ b/src/packages/plg_task_mokowaasdemo/mokowaasdemo.xml @@ -12,8 +12,8 @@ GNU General Public License version 3 or later; see LICENSE hello@mokoconsulting.tech https://mokoconsulting.tech - 02.29.04 - 02.29.04 + 02.30.00 + 02.30.00 PLG_TASK_MOKOWAASDEMO_DESC Moko\Plugin\Task\MokoWaaSDemo diff --git a/src/packages/plg_task_mokowaassync/mokowaassync.xml b/src/packages/plg_task_mokowaassync/mokowaassync.xml index c1b1ce3..e998392 100644 --- a/src/packages/plg_task_mokowaassync/mokowaassync.xml +++ b/src/packages/plg_task_mokowaassync/mokowaassync.xml @@ -12,7 +12,7 @@ GNU General Public License version 3 or later; see LICENSE hello@mokoconsulting.tech https://mokoconsulting.tech - 02.29.04 + 02.30.00 PLG_TASK_MOKOWAASSYNC_DESC Moko\Plugin\Task\MokoWaaSSync diff --git a/src/packages/plg_webservices_mokowaas/mokowaas.xml b/src/packages/plg_webservices_mokowaas/mokowaas.xml index ac1a491..8ac72cb 100644 --- a/src/packages/plg_webservices_mokowaas/mokowaas.xml +++ b/src/packages/plg_webservices_mokowaas/mokowaas.xml @@ -7,8 +7,8 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 02.29.04 - 02.29.04 + 02.30.00 + 02.30.00 Joomla Web Services API routes for MokoWaaS site management — health checks, cache, updates, backups, and site info. Moko\Plugin\WebServices\MokoWaaS diff --git a/src/packages/plg_webservices_perfectpublisher/perfectpublisher.xml b/src/packages/plg_webservices_perfectpublisher/perfectpublisher.xml index 6b9f136..7b6b09f 100644 --- a/src/packages/plg_webservices_perfectpublisher/perfectpublisher.xml +++ b/src/packages/plg_webservices_perfectpublisher/perfectpublisher.xml @@ -7,8 +7,8 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 02.29.04 - 02.29.04 + 02.30.00 + 02.30.00 Joomla Web Services API routes for Perfect Publisher (com_autotweet) — channels, posts, requests, rules, and feeds. Moko\Plugin\WebServices\PerfectPublisher diff --git a/src/packages/plg_webservices_perfectpublisher/services/provider.php b/src/packages/plg_webservices_perfectpublisher/services/provider.php index 8398800..0b16ed6 100644 --- a/src/packages/plg_webservices_perfectpublisher/services/provider.php +++ b/src/packages/plg_webservices_perfectpublisher/services/provider.php @@ -8,7 +8,7 @@ * INGROUP: MokoWaaS * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS * PATH: /src/packages/plg_webservices_perfectpublisher/services/provider.php - * VERSION: 02.29.04 + * VERSION: 02.30.00 * BRIEF: DI service provider for Perfect Publisher Web Services plugin */ diff --git a/src/packages/plg_webservices_perfectpublisher/src/Extension/PerfectPublisherApi.php b/src/packages/plg_webservices_perfectpublisher/src/Extension/PerfectPublisherApi.php index 5882112..ef1c569 100644 --- a/src/packages/plg_webservices_perfectpublisher/src/Extension/PerfectPublisherApi.php +++ b/src/packages/plg_webservices_perfectpublisher/src/Extension/PerfectPublisherApi.php @@ -8,7 +8,7 @@ * INGROUP: MokoWaaS * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS * PATH: /src/packages/plg_webservices_perfectpublisher/src/Extension/PerfectPublisherApi.php - * VERSION: 02.29.04 + * VERSION: 02.30.00 * BRIEF: Web Services API plugin for Perfect Publisher (com_autotweet) */ diff --git a/src/pkg_mokowaas.xml b/src/pkg_mokowaas.xml index 69fa778..8bab697 100644 --- a/src/pkg_mokowaas.xml +++ b/src/pkg_mokowaas.xml @@ -2,8 +2,8 @@ Package - MokoWaaS mokowaas - 02.29.04 - 02.29.04 + 02.30.00 + 02.30.00 2026-05-23 Moko Consulting hello@mokoconsulting.tech diff --git a/src/script.php b/src/script.php index a022b80..03eace5 100644 --- a/src/script.php +++ b/src/script.php @@ -45,6 +45,9 @@ class Pkg_MokowaasInstallerScript // Mark MokoWaaS extensions as protected (prevents disable/uninstall at framework level) $this->protectExtensions(); + // Clean up stale/duplicate update sites + $this->cleanupStaleUpdateSites(); + // Trigger heartbeat registration $this->sendHeartbeat(); } @@ -218,6 +221,92 @@ class Pkg_MokowaasInstallerScript } } + /** + * Remove stale and duplicate MokoWaaS update site entries. + * + * Keeps only the package-level update site pointing to the dynamic + * MokoGitea endpoint. Removes plugin-level entries, old static URLs, + * and orphaned #__updates rows tied to deleted update sites. + * + * @return void + * + * @since 02.30.00 + */ + private function cleanupStaleUpdateSites(): void + { + try + { + $db = Factory::getDbo(); + $dynamicUrl = 'https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/updates.xml'; + + // Find all MokoWaaS update sites + $query = $db->getQuery(true) + ->select($db->quoteName(['update_site_id', 'location'])) + ->from($db->quoteName('#__update_sites')) + ->where('(' . $db->quoteName('name') . ' LIKE ' . $db->quote('%MokoWaaS%') + . ' OR ' . $db->quoteName('location') . ' LIKE ' . $db->quote('%MokoWaaS%') . ')'); + $db->setQuery($query); + $sites = $db->loadObjectList(); + + $keepId = null; + $removeIds = []; + + foreach ($sites as $site) + { + if ($site->location === $dynamicUrl && $keepId === null) + { + $keepId = (int) $site->update_site_id; + } + else + { + $removeIds[] = (int) $site->update_site_id; + } + } + + if (empty($removeIds)) + { + return; + } + + $idList = implode(',', $removeIds); + + // Remove orphaned #__updates rows + $db->setQuery( + $db->getQuery(true) + ->delete($db->quoteName('#__updates')) + ->where($db->quoteName('update_site_id') . ' IN (' . $idList . ')') + )->execute(); + + // Remove link rows + $db->setQuery( + $db->getQuery(true) + ->delete($db->quoteName('#__update_sites_extensions')) + ->where($db->quoteName('update_site_id') . ' IN (' . $idList . ')') + )->execute(); + + // Remove stale update sites + $db->setQuery( + $db->getQuery(true) + ->delete($db->quoteName('#__update_sites')) + ->where($db->quoteName('update_site_id') . ' IN (' . $idList . ')') + )->execute(); + + $count = count($removeIds); + + if ($count > 0) + { + Factory::getApplication()->enqueueMessage( + sprintf('Cleaned up %d stale MokoWaaS update site(s).', $count), + 'message' + ); + } + } + catch (\Throwable $e) + { + Log::add('Error cleaning up stale update sites: ' . $e->getMessage(), Log::WARNING, 'jerror'); + } + } + /** * Ensure the MokoWaaS update server entry stays enabled and points * to the correct dynamic endpoint with the license key attached.