fix: exclude MokoWaaSBase from stale update site cleanup

cleanupStaleUpdateSites() matched '%MokoWaaS%' which also caught
MokoWaaSBase entries, deleting their update server registration.
Added NOT LIKE exclusions for MokoWaaSBase.
This commit is contained in:
Jonathan Miller
2026-06-06 20:32:05 -05:00
parent 83009472b7
commit dcff922c56
+4 -2
View File
@@ -595,12 +595,14 @@ class Pkg_MokowaasInstallerScript
$db = Factory::getDbo();
$dynamicUrl = 'https://git.mokoconsulting.tech/MokoConsulting/MokoWaaS/updates.xml';
// Find all MokoWaaS update sites
// Find MokoWaaS update sites (exclude MokoWaaSBase and other Moko extensions)
$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%') . ')');
. ' OR ' . $db->quoteName('location') . ' LIKE ' . $db->quote('%MokoWaaS%') . ')')
->where($db->quoteName('name') . ' NOT LIKE ' . $db->quote('%MokoWaaSBase%'))
->where($db->quoteName('location') . ' NOT LIKE ' . $db->quote('%MokoWaaSBase%'));
$db->setQuery($query);
$sites = $db->loadObjectList();