refactor: defer login support URL enforcement to future release

Remove enforceLoginSupportUrls() from runtime and
updateLoginSupportUrls() from install script. Both write hardcoded
mokoconsulting.tech/support, /kb, /news URLs to mod_loginsupport
module params — these pages don't exist yet.

Login support TEXT overrides (MOD_LOGINSUPPORT_FORUM etc.) are kept
since they work locally without an endpoint. The underlying hrefs
will still point to joomla.org until the endpoints are built and
URL enforcement is restored.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-04 20:49:12 -05:00
parent d47ae15b34
commit 0b52d50e8a
2 changed files with 0 additions and 122 deletions
-56
View File
@@ -123,7 +123,6 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface
if ($type === 'install' || $type === 'update')
{
$this->installLanguageOverrides();
$this->updateLoginSupportUrls();
}
return true;
@@ -312,61 +311,6 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface
}
}
/**
* Update the mod_loginsupport module params to point to Moko Consulting URLs.
*
* Joomla's login support module stores forum, documentation, and news URLs
* as module parameters in the database. Language overrides can change the
* link text but not the href — this method rewrites the module params so
* the actual links point to mokoconsulting.tech.
*
* @return void
*
* @since 02.00.00
*/
private function updateLoginSupportUrls()
{
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select([$db->quoteName('id'), $db->quoteName('params')])
->from($db->quoteName('#__modules'))
->where($db->quoteName('module') . ' = ' . $db->quote('mod_loginsupport'));
$db->setQuery($query);
$modules = $db->loadObjectList();
if (empty($modules))
{
return;
}
$supportUrls = [
'forum_url' => 'https://mokoconsulting.tech/support',
'documentation_url' => 'https://mokoconsulting.tech/kb',
'news_url' => 'https://mokoconsulting.tech/news',
];
foreach ($modules as $module)
{
$params = new \Joomla\Registry\Registry($module->params ?: '{}');
foreach ($supportUrls as $key => $url)
{
$params->set($key, $url);
}
$update = $db->getQuery(true)
->update($db->quoteName('#__modules'))
->set($db->quoteName('params') . ' = ' . $db->quote($params->toString()))
->where($db->quoteName('id') . ' = ' . (int) $module->id);
$db->setQuery($update);
$db->execute();
}
Factory::getApplication()->enqueueMessage('Updated login support URLs to Moko Consulting.', 'message');
}
/**
* Remove only MokoWaaS overrides from Joomla's global override files.
*